commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
b61d16d55f191d493dc2fc801355952044725329
Jon Gjengset
2019-06-26T19:24:24
Easier access to sync
diff --git a/Cargo.toml b/Cargo.toml index dea8909..3142567 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.3.0" +version = "6.3.1" edition = "2018" description = "A port of HdrHistogram to Rust" diff --git a/src/lib.rs b/src/lib.rs index e8b96c3..a13266b 100...
2
9
1
75c90a49202a0e13a6ff28c08b588027b72479fc
Jon Gjengset
2019-06-25T22:18:22
Bump to 6.3.0 for multi-threaded recording
diff --git a/Cargo.toml b/Cargo.toml index ceb3953..dea8909 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.2.0" +version = "6.3.0" edition = "2018" description = "A port of HdrHistogram to Rust"
1
1
1
527b10b56dfc36f903eab84b16c37a50da6e125c
Jon Gjengset
2019-06-25T22:20:11
Fix some errors in sync docs
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index ed141ab..fa08518 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -13,7 +13,9 @@ use std::time; /// concurrently. Writes to a `Recorder` are wait-free and scalable except for when the /// [`SyncHistogram`] initiates a _phase shift_. During a phase shift, the n...
1
4
3
5a9dff2a5c04ffb2442c1a3237740a80e2e83d7a
Jon Gjengset
2019-06-21T00:34:21
No more locking on write path This patch replaces the previous mutex-based design where the readers took turns merging their local histograms into the shared one on a phase change with one where the readers instead send their histograms to the reader over a channel. The reader is then responsible for merging them toge...
diff --git a/Cargo.toml b/Cargo.toml index f832933..ceb3953 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ maintenance = { status = "passively-maintained" } [features] bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code serialization = [ "flat...
3
109
259
e868ab5c8024987a57e8bd7c4f4590772c7706ed
Jon Gjengset
2019-06-20T23:23:02
Make sync support optional
diff --git a/Cargo.toml b/Cargo.toml index 8b797e3..f832933 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,8 @@ maintenance = { status = "passively-maintained" } [features] bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code serialization = [ "flat...
3
253
250
e484a641de7ab35b676a17ed7d6811259d3ba304
Jon Gjengset
2019-06-20T15:03:53
Better test coverage
diff --git a/tests/sync.rs b/tests/sync.rs index a264ed0..04d3927 100644 --- a/tests/sync.rs +++ b/tests/sync.rs @@ -148,6 +148,25 @@ fn mt_record_static() { assert_eq!(h.len(), jhs.into_iter().map(|r| r.join().unwrap()).sum()); } +#[test] +fn no_block_empty_sync() { + let h: SyncHistogram<_> = Histogram::<u...
1
51
6
66decb91a7e4e93983dfc42493d1461787bbe2f1
Jon Gjengset
2019-06-20T13:05:00
Sync recorders on drop
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 453dcd4..2ee9b50 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -20,9 +20,9 @@ use std::time; /// time, it should call [`Recorder::idle`], which will tell the reader not to wait for this /// particular writer. /// -/// If a `Recorder` is dropped, any sample...
2
55
3
bf19ca99f06753003bd6a7fed6cf8ed11b3bd5a3
Jon Gjengset
2019-06-19T21:20:39
Rename phase() to refresh()
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 861e513..453dcd4 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -16,13 +16,13 @@ use std::time; /// available to the [`SyncHistogram`] once the phase shift completes. /// /// An idle `Recorder` will hold up a phase shift indefinitely, or until it times out ...
2
21
21
f22bbbc7713261a765e58f9ad13c1c6c1dc18580
Jon Gjengset
2019-06-19T21:09:36
Add multi-threaded tests
diff --git a/tests/sync.rs b/tests/sync.rs index 8a7cdd9..e64f7ca 100644 --- a/tests/sync.rs +++ b/tests/sync.rs @@ -118,6 +118,73 @@ fn phase_no_wait_after_drop() { assert_eq!(h.len(), 0); } +#[test] +fn mt_record_static() { + let mut h: SyncHistogram<_> = Histogram::<u64>::new_with_max(TRACKABLE_MAX, SIGFI...
1
67
0
c1aa34a1d5241c624157b1b22f10174335a5e986
Jon Gjengset
2019-06-19T21:09:31
Add missing notifys
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index aebc76a..861e513 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -227,6 +227,9 @@ impl<C: Counter> Recorder<C> { if phase != self.last_phase { crit.phased += 1; self.last_phase = phase; + ...
1
4
0
a92e6880425b8d5cffdb9ddc1ec4d86d47319193
Jon Gjengset
2019-06-19T18:42:49
Add more methods to control sync+timeouts
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 3111cd2..aebc76a 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -3,7 +3,9 @@ use crate::errors::*; use crate::{Counter, Histogram}; use std::borrow::Borrow; +use std::ops::{AddAssign, Deref, DerefMut}; use std::sync::{atomic, Arc, Condvar, Mutex}; +use std...
2
229
19
2511967dfe7c526d1638f663f55442ae977492c6
Jon Gjengset
2019-06-19T17:11:37
First draft
diff --git a/src/lib.rs b/src/lib.rs index 3826621..820ab37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1845,3 +1845,4 @@ pub mod errors; pub mod serialization; pub use self::core::counter::*; pub use errors::*; +pub mod sync; diff --git a/src/sync/mod.rs b/src/sync/mod.rs new file mode 100644 index 0000000..3111cd...
2
353
0
85abbf7158445f73702cb0bcdf91102479ae0724
Jon Gjengset
2019-06-01T21:43:19
Release 6.2.0 Arguably breaking due to edition 2018, but not breaking if we assume last 3 stable releases of compiler. Arguably breaking due to removal of a macro, but no-one should be using that macro anyway as it was accidentally exposed and does nothing useful.
diff --git a/Cargo.toml b/Cargo.toml index 87f340f..8b797e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.1.1" +version = "6.2.0" edition = "2018" description = "A port of HdrHistogram to Rust"
1
1
1
40b66cc1e53e808f77328d07dc44e4ba07e16c8b
Jon Gjengset
2019-06-01T20:54:59
Clippy clean
diff --git a/src/iterators/quantile.rs b/src/iterators/quantile.rs index 17c261f..b45dc6d 100644 --- a/src/iterators/quantile.rs +++ b/src/iterators/quantile.rs @@ -34,7 +34,7 @@ impl<'a, T: 'a + Counter> Iter<'a, T> { } impl<'a, T: 'a + Counter> PickyIterator<T> for Iter<'a, T> { - #[cfg_attr(feature = "cargo-c...
3
14
7
fde9b2390b6150f9e3426f91f78f1db5a849e35e
Jon Gjengset
2019-05-31T21:59:39
Start of move to 2018 edition
diff --git a/Cargo.toml b/Cargo.toml index a6d2e25..87f340f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "hdrhistogram" version = "6.1.1" +edition = "2018" description = "A port of HdrHistogram to Rust" readme = "README.md" diff --git a/benches/interval_log.rs b/benches/interval_log....
31
135
144
d4ffb2a842e124bc37ef3f5ba8626a510dd4df81
Jon Gjengset
2019-05-31T21:49:40
Remove macro that shouldn't have been public
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 33bdcad..03be195 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -755,7 +755,6 @@ fn fract_sec_duration(input: &[u8]) -> IResult<&[u8], time::Duration> { } // alternate ...
1
0
1
b2c933687cad798b7846e5fddcc5b36038911787
Jon Gjengset
2018-12-04T18:36:40
Set maintenance status
diff --git a/Cargo.toml b/Cargo.toml index 58894c7..a6d2e25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.1.0" +version = "6.1.1" description = "A port of HdrHistogram to Rust" readme = "README.md" @@ -21,6 +21,7 @@ license = "MIT/Apache-2.0" [badges] t...
2
5
7
4868370b8a89bd8cd8a0808303bb63bbcfa36efa
Jon Gjengset
2018-09-10T16:42:19
Bump externally-visible num-traits w/major
diff --git a/Cargo.toml b/Cargo.toml index b47a2df..58894c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.0.7" +version = "6.1.0" description = "A port of HdrHistogram to Rust" readme = "README.md" @@ -28,7 +28,7 @@ serialization = [ "flate2", "nom", "base6...
1
2
2
af7d142870739b4dde03800d379ed16256e6e71f
Jon Gjengset
2018-09-10T16:42:08
Some more warnings
diff --git a/benches/serialization.rs b/benches/serialization.rs index f4b583c..31ad3db 100644 --- a/benches/serialization.rs +++ b/benches/serialization.rs @@ -4,6 +4,7 @@ extern crate hdrhistogram; extern crate rand; extern crate test; +use self::rand::FromEntropy; use self::test::Bencher; use hdrhistogram::ser...
1
3
2
564d64e6f7ea7533b1b0dadcbe5a19c9de4df1bd
Jon Gjengset
2018-09-10T16:39:42
Version bump
diff --git a/Cargo.toml b/Cargo.toml index d15d291..b47a2df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.0.6" +version = "6.0.7" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
4f023c9f9f569c4a35b03108c82f906df97e293c
Jon Gjengset
2018-09-10T16:39:07
Long overdue dependency bump
diff --git a/Cargo.toml b/Cargo.toml index 99c010a..d15d291 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,13 +30,13 @@ default = [ "serialization" ] [dependencies] num-traits = "0.1" byteorder = "1.0.0" -flate2 = { version = "0.2.17", optional = true } +flate2 = { version = "1.0", optional = true } nom = { versio...
9
86
81
0f18fcfc32f767dcc5584a233c8c0caef41797f9
Geoffroy Couprie
2018-08-23T10:25:06
update nom to 4.0
diff --git a/Cargo.toml b/Cargo.toml index 2ea207f..99c010a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ default = [ "serialization" ] num-traits = "0.1" byteorder = "1.0.0" flate2 = { version = "0.2.17", optional = true } -nom = { version = "^3.2.0", optional = true } +nom = { version = "^4.0", option...
2
28
11
b091edc769a36b61fa51bdea3fb77271fd9e13e8
Jon Gjengset
2018-03-29T22:00:13
Don't deny warnings as it blocks future compat If the compiler introduces a warning that occurs in our code, deny(warnings) will prevent downstream crates that depend on hdrhistogram from compiling. We don't want that.
diff --git a/Cargo.toml b/Cargo.toml index 3ce5498..2ea207f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.0.5" +version = "6.0.6" description = "A port of HdrHistogram to Rust" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 0c1d89d..2072803...
2
2
2
ac7b74ad80263847fe2f7f6ff3aeaf8812c019fc
Jon Gjengset
2018-03-27T22:31:27
Add more convenience methods for add/sub
diff --git a/Cargo.toml b/Cargo.toml index 67d7b2f..3ce5498 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.0.4" +version = "6.0.5" description = "A port of HdrHistogram to Rust" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 1f0c433..0c1d89d...
2
31
1
4ca2008b5a62b51e95caff58705e48d60a5e729c
PeterSP
2018-03-15T01:02:25
Correct spellings
diff --git a/src/lib.rs b/src/lib.rs index bc037b6..eb4d6d7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! # HdrHistogram //! //! What follows is a description from [the HdrHistogram -//! website](https://hdrhistogram.github.io/HdrHistogram/). Users are encourages to read the +//! website](https://hdrh...
1
2
2
172959035252742e1c82319b16571c4947adec04
Jon Gjengset
2018-03-04T17:41:51
Bump version for rust-lang/rust#48717
diff --git a/Cargo.toml b/Cargo.toml index 45c66b3..67d7b2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrhistogram" -version = "6.0.3" +version = "6.0.4" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
9b286e3a669eba9de5b6d6a918de998d01cb99c1
Jon Gjengset
2018-02-15T00:43:51
Fix nightly compile warning -> error
diff --git a/src/tests/value_calculation.rs b/src/tests/value_calculation.rs index 43edf72..722f1da 100644 --- a/src/tests/value_calculation.rs +++ b/src/tests/value_calculation.rs @@ -25,7 +25,7 @@ fn equivalent_range_unit_magnitude_0() { // max value in top bucket assert_eq!(1 << 6, h.equivalent_range((1 <<...
1
2
2
deeaba0f994ba428b3b1f06dc38f75e4a72d5074
Trevor Spiteri
2017-12-31T22:54:53
update rug to 0.9.1, and use rug more idiomatically
diff --git a/Cargo.toml b/Cargo.toml index d8ac03e..f37956f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ base64 = { version = "0.7.0", optional = true } [dev-dependencies] rand = "0.3.15" -rug = "0.6.0" +rug = "0.9.1" ieee754 = "0.2.2" clap = "2.26.2" diff --git a/tests/quantile.rs b/tests/quantil...
2
7
19
1737548158f639a133e3a546efb38deecbd5feb4
Jon Gjengset
2017-12-23T17:59:31
Bump for saturating_add
diff --git a/Cargo.toml b/Cargo.toml index 0a3ca71..d8ac03e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrsample" -version = "6.0.0" +version = "6.0.1" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
b045a49d6ca01c70422ca5715740b673dd5d1062
Jon Gjengset
2017-12-21T04:00:06
Address comments
diff --git a/src/lib.rs b/src/lib.rs index e28b217..e034a9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -817,7 +817,8 @@ impl<T: Counter> Histogram<T> { /// /// This method cannot fail, as any values that are too small or too large to be tracked will /// automatically be clamed to be in range. Be aware t...
2
18
9
85988082a978f8ab44835cea828941bbe10a5018
Jon Gjengset
2017-12-21T03:31:00
Add saturating_record for clamped recording Fixes #72.
diff --git a/src/lib.rs b/src/lib.rs index d9bc3c3..e28b217 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -813,12 +813,37 @@ impl<T: Counter> Histogram<T> { self.record_n(value, T::one()) } + /// Record `value` in the histogram, clamped to the range of the histogram. + /// + /// This method canno...
2
60
14
479039e61ec236aa74aaa9c989f5c8f430056d73
Marshall Pierce
2017-12-08T16:42:31
Add a few more details.
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 24a82d5..d54aa4c 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -37,7 +37,10 @@ //! while to start up. If this is relevant to your workload, use StartTime to record the ac...
1
9
3
d23d16bab75bf47d64452ef6d6556a8dcd52c0c7
Marshall Pierce
2017-12-08T13:39:59
Clarify interval log semantics. See https://gitter.im/HdrHistogram/HdrHistogram?at=5a1a731771ad3f87362ebd42.
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 4ea70a4..24a82d5 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -12,58 +12,102 @@ //! The intervals in the log should be ordered by start timestamp. It's possible to write...
1
89
45
cf9ec24ebb092eafeb80447cda0829b80a1fce93
Marshall Pierce
2017-11-06T19:03:52
Parse fractional seconds into a Duration directly. Parsing into an f64 then separately truncating to an int and multiplying the fractional part by 1_000_000_000 introduced errors in the fractional part since frequently abc.xyz cannot produce 0.xyz as an f64, but has to have 0.xyz0000001 or something like that.
diff --git a/benches/record.rs b/benches/record.rs index 758988b..128ba63 100644 --- a/benches/record.rs +++ b/benches/record.rs @@ -175,7 +175,9 @@ fn do_add_benchmark<F: Fn() -> Histogram<u64>>( addends.push(h); } - b.iter(|| for h in addends.iter() { - accum.add(h).unwrap(); + b.iter(|| ...
4
149
44
bba89704718047e0e29f133e75b7970fb8caba94
Marshall Pierce
2017-11-04T00:02:15
Turn comments with newlines into multiple comment lines
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 6ebc4b0..6472e6b 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -166,7 +166,7 @@ extern crate base64; use std::{fmt, io, ops, str, time}; use std::fmt::Write; -use nom:...
2
79
16
2e247693c7e1ef3ed290267a35abc8392c20da61
Marshall Pierce
2017-11-03T21:53:04
Apply rustfmt, and appease line length warnings
diff --git a/benches/interval_log.rs b/benches/interval_log.rs index 9b2b29a..2984e80 100644 --- a/benches/interval_log.rs +++ b/benches/interval_log.rs @@ -43,7 +43,9 @@ fn write_interval_log_1k_hist_10k_value(b: &mut Bencher) { let dur = time::Duration::new(5, 678_000_000); for h in histograms.ite...
5
17
10
4d35a9e20903d3d21cd95aec05024b7d1c62e6be
Marshall Pierce
2017-11-03T20:38:50
Use Duration for per-interval start timestamp
diff --git a/benches/interval_log.rs b/benches/interval_log.rs index 2c6dece..9b2b29a 100644 --- a/benches/interval_log.rs +++ b/benches/interval_log.rs @@ -43,7 +43,7 @@ fn write_interval_log_1k_hist_10k_value(b: &mut Bencher) { let dur = time::Duration::new(5, 678_000_000); for h in histograms.ite...
4
41
24
046b595aa64c486af659c53de4cba60f6a00165b
Marshall Pierce
2017-11-03T20:13:24
Use `SystemTime` for start and base time
diff --git a/benches/interval_log.rs b/benches/interval_log.rs index 18a61a6..2c6dece 100644 --- a/benches/interval_log.rs +++ b/benches/interval_log.rs @@ -38,7 +38,7 @@ fn write_interval_log_1k_hist_10k_value(b: &mut Bencher) { log.clear(); let mut writer = interval_log::IntervalLogWriterBuilder::...
4
39
25
a5997fe1e2a3de35a8d26811c5435b1f33c4774f
Marshall Pierce
2017-11-03T15:05:50
Use builder style for creating an IntervalLogWriter
diff --git a/benches/interval_log.rs b/benches/interval_log.rs index 77b7ca7..18a61a6 100644 --- a/benches/interval_log.rs +++ b/benches/interval_log.rs @@ -4,6 +4,8 @@ extern crate hdrsample; extern crate rand; extern crate test; +use std::time; + use hdrsample::*; use hdrsample::serialization; use hdrsample::s...
4
205
108
15c14aa827fad25384fcfde2f43b4c2ab873cd24
Marshall Pierce
2017-11-03T02:11:54
IntervalLogIterator stops once it encounters a parse error
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 46b04c2..f70ce8d 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -94,7 +94,7 @@ //! ``` //! use hdrsample::serialization::interval_log; //! -//! let mut log = "\ +//! let...
2
23
4
94574f359bd5d223b6ee59211797772e5d0071fe
Marshall Pierce
2017-11-02T22:49:19
Address PR feedback, part 1. - Doc test tidying - Use `time::Duration` for interval duration
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index e9b33af..46b04c2 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -94,21 +94,22 @@ //! ``` //! use hdrsample::serialization::interval_log; //! -//! let mut log = Vec::new(...
4
80
28
ed8cda68ec3595f1a816490b431404a4a7664ab2
Marshall Pierce
2017-11-01T02:43:48
Fix a few doc quirks and other minor cleanup
diff --git a/src/lib.rs b/src/lib.rs index 6f66f54..9ab2df3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1751,9 +1751,6 @@ where // TODO: shift // TODO: hash -// TODO: encoding/decoding -// TODO: timestamps and tags -// TODO: textual output #[path = "tests/tests.rs"] #[cfg(test)] diff --git a/src/serialization/...
3
14
17
686e350d3c77d950d074d39ff5f035c52e2d1c87
Marshall Pierce
2017-10-31T15:20:04
Bring back compiler warnings
diff --git a/src/lib.rs b/src/lib.rs index b35b5c5..6f66f54 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -182,7 +182,7 @@ //! ergonomic as possible. #![deny(missing_docs, trivial_casts, trivial_numeric_casts, unused_extern_crates, - unused_import_braces, unused_results)] + unused_import_braces, unused_...
2
2
1
00a5ee1602775ad0fbee5bfe3159b69bd1ea880f
Marshall Pierce
2017-10-29T03:32:24
Add docs explaining BaseTime and StartTime
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index 096fa51..e42be0d 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -7,13 +7,161 @@ //! see in logs, etc. //! //! An interval log contains some initial metadata, then a sequ...
2
248
58
5553e18b9ad2c46a8f54969f127a99559d672053
Marshall Pierce
2017-10-27T15:50:04
Add interval log benchmark. It's fast enough that I'm not stressing about optimizing it further.
diff --git a/benches/interval_log.rs b/benches/interval_log.rs new file mode 100644 index 0000000..77b7ca7 --- /dev/null +++ b/benches/interval_log.rs @@ -0,0 +1,78 @@ +#![feature(test)] + +extern crate hdrsample; +extern crate rand; +extern crate test; + +use hdrsample::*; +use hdrsample::serialization; +use hdrsample...
2
86
4
471be3af6d1e5c6188628df4bc55971c7bcac46c
Marshall Pierce
2017-10-27T03:16:24
Clarify some docs
diff --git a/src/serialization/interval_log/mod.rs b/src/serialization/interval_log/mod.rs index f19d6d4..1ee4788 100644 --- a/src/serialization/interval_log/mod.rs +++ b/src/serialization/interval_log/mod.rs @@ -9,7 +9,7 @@ //! An interval log contains some initial metadata, then a sequence of histograms, each with s...
3
12
8
e32c13a470636e93167109026f563b43924128e9
Marshall Pierce
2017-10-26T16:51:04
Move a test into serialization module so it's easier to maintain
diff --git a/tests/histogram.rs b/tests/histogram.rs index bd75190..42096ee 100644 --- a/tests/histogram.rs +++ b/tests/histogram.rs @@ -6,7 +6,6 @@ extern crate rand; use self::rand::Rng; use hdrsample::{Counter, Histogram, SubtractionError}; -use hdrsample::serialization::Serializer; use std::borrow::Borrow; us...
2
19
22
4d20592e8f32e2805ad782af0ba7e10662acd1ac
Marshall Pierce
2017-10-26T14:42:21
Introduce a Serializer trait for serializers, and a Tag wrapper. Start work on writing logs.
diff --git a/Cargo.toml b/Cargo.toml index d84e5cb..0a3ca71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ travis-ci = { repository = "jonhoo/hdrsample" } [features] bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code -serialization = [ "flat...
13
558
290
b7990f7a39d5b755e310632a23a1ac1ff855cf79
Marshall Pierce
2017-10-09T20:56:02
Iterate over log entries
diff --git a/Cargo.toml b/Cargo.toml index 9d00247..d84e5cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,13 +24,14 @@ travis-ci = { repository = "jonhoo/hdrsample" } [features] bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code -serialization = [ "fl...
7
397
10
0290f6867040a00ea2050d4a927d8052c7e32cbf
Jon Gjengset
2017-10-24T17:24:18
Release 6.0.0 This release has a couple of backwards-incompatible changes: - the old `len()` is now `distinct_values()` - the new `len()` is the old `count()` (which is deprecated) - `IterationValue::value` became `value_iterated_to` Some other API changes: - iterator values gained `quantile_iterated_to()` - `...
diff --git a/Cargo.toml b/Cargo.toml index 7bc2ff4..9d00247 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrsample" -version = "5.1.0" +version = "6.0.0" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
6f995607d8d7b41ecacc4f8274689f9007be2441
Jon Gjengset
2017-10-24T17:21:03
len -> distinct_values, count -> len This is a better match for what "len" normally means. For example, `HashMap::len` doesn't return the number of buckets, but the number of *values*. It also matches better the intuition that `len` and `is_empty` are related (whereas `count` and `is_empty` being related is less obvio...
diff --git a/benches/serialization.rs b/benches/serialization.rs index 31cbca6..15a356c 100644 --- a/benches/serialization.rs +++ b/benches/serialization.rs @@ -171,7 +171,7 @@ fn do_serialize_bench<S>( S: TestOnlyHypotheticalSerializerInterface, { let mut h = Histogram::<u64>::new_with_bounds(low, high, dig...
11
75
67
e250d1b7326ba8e944974ff91019fcc62db87b5b
Marshall Pierce
2017-10-24T15:04:36
Use quantile_iterated_to() in iter-quantiles example.
diff --git a/examples/cli.rs b/examples/cli.rs index 117f9ef..4003b87 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -121,7 +121,7 @@ fn quantiles<R: BufRead, W: Write>(mut reader: R, mut writer: W, quantile_precis let mut sum = 0; for v in hist.iter_quantiles(ticks_per_half) { sum += v.count_...
1
2
2
0e2c3c607225de913a97b0ad54ce2e98e5d17bf0
Soeren Roerden
2017-10-24T14:52:29
Change exports and add docs
diff --git a/src/core/mod.rs b/src/core/mod.rs index f10ce91..72fb044 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -1,7 +1,4 @@ //! core components and types used throughout this library -/// Error types used throughout this library. -pub mod errors; - /// Counter type defining operations required by the h...
3
4
4
4ad0a212072f834790429cd70c9de3c73910326a
Soeren Roerden
2017-10-24T14:50:23
move errors
diff --git a/src/core/errors.rs b/src/errors/mod.rs similarity index 100% rename from src/core/errors.rs rename to src/errors/mod.rs
1
0
0
beec46f52da3b510ea7cb2e29837e1b9507c2f26
Marshall Pierce
2017-10-24T14:49:26
Improve quantile iteration logic, and document its quirkiness. - Supply count at current index to `pick()` since we already have that available - Quantile iterator won't get stuck asymptotically chasing quantile 1.0_f64 - More tests
diff --git a/src/iterators/all.rs b/src/iterators/all.rs index 744ebc3..3dd6470 100644 --- a/src/iterators/all.rs +++ b/src/iterators/all.rs @@ -13,7 +13,7 @@ impl Iter { } impl<T: Counter> PickyIterator<T> for Iter { - fn pick(&mut self, index: usize, _: u64) -> Option<PickMetadata> { + fn pick(&mut self, in...
8
454
61
85eadf790a4999f5e63b991baa3fbb103779955f
Marshall Pierce
2017-10-23T13:15:49
Port iteration tests from the old rust impl
diff --git a/src/iterators/quantile.rs b/src/iterators/quantile.rs index ef58da5..fa5e7d8 100644 --- a/src/iterators/quantile.rs +++ b/src/iterators/quantile.rs @@ -43,6 +43,7 @@ impl<'a, T: 'a + Counter> PickyIterator<T> for Iter<'a, T> { // We incremented to 1.0 just at the point where we finally got to ...
2
375
4
421791d79a99689cdcdd03b9cbdee503593cf8e9
Marshall Pierce
2017-10-19T22:35:47
Rework iteration logic. - `LinearIterator` no longer aborts one step too early in the final bucket. - `PickyIterator` now returns metadata when it picks. This allows `IterationValue` to provide better data about the current iteration progress without introducing a separate stage in the `PickyIterator` lifecycle to que...
diff --git a/examples/cli.rs b/examples/cli.rs index 9dc7855..117f9ef 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -125,7 +125,7 @@ fn quantiles<R: BufRead, W: Write>(mut reader: R, mut writer: W, quantile_precis writer.write_all( format!( "{:12} {:1.*} {:1.*}...
12
241
133
95436cb242151b611f32275a2066a5dcd77b5432
Marshall Pierce
2017-10-14T19:22:32
Pull quantile stuff out of data_access because the quantile stuff is porky enough to stand on its own and data_access is a port of a Java test file anyway.
diff --git a/tests/data_access.rs b/tests/data_access.rs index 06aa055..a2d424f 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -1,17 +1,10 @@ //! Tests from HistogramDataAccessTest.java extern crate hdrsample; -extern crate rand; extern crate ieee754; extern crate rug; -use hdrsample::{Histogra...
3
400
392
5e02609b6ec07c761a006c2261f5655c6bbe896b
Marshall Pierce
2017-04-11T23:21:35
Failing test to show that iter_recorded stops too soon
diff --git a/tests/iterators.rs b/tests/iterators.rs new file mode 100644 index 0000000..43bbf06 --- /dev/null +++ b/tests/iterators.rs @@ -0,0 +1,33 @@ +extern crate hdrsample; +extern crate num; +extern crate rand; + +use hdrsample::Histogram; + +#[test] +fn iter_recorded_non_saturated_total_count() { + let mut h ...
1
33
0
0c5e264eff0d6c449621d4288dbbc1a42f42f0a0
Marshall Pierce
2017-10-14T19:09:58
Fix up doc tests that instantiate iteration values
diff --git a/src/lib.rs b/src/lib.rs index a7a282e..e55c3fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1002,17 +1002,17 @@ impl<T: Counter> Histogram<T> { /// /// println!("{:?}", hist.iter_quantiles(1).collect::<Vec<_>>()); /// - /// assert_eq!(perc.next(), Some(IterationValue::new(hist.value_at_qu...
1
34
34
3b1b3bae29d558701d512c571f25c42214260063
Marshall Pierce
2017-10-14T19:01:06
Make quantile iterator tool show both quantile at the value and quantile iterated to
diff --git a/examples/cli.rs b/examples/cli.rs index d0a5fd7..9dc7855 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -51,14 +51,14 @@ fn main() { .arg(Arg::with_name("quantile-precision") .long("quantile-precision") .takes_value(true)...
7
64
24
2804a9f035351fd271828372ad6750732608f7f0
Marshall Pierce
2017-10-13T21:52:20
Tweak quantile iteration logic
diff --git a/examples/cli.rs b/examples/cli.rs index 74471c2..d0a5fd7 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -40,7 +40,7 @@ fn main() { .short("r") .long("resize") .help("Enable auto resize"))) - .subcommand...
4
27
20
2da9f0aaf40c9a3650a583bbd590c54fa20968b2
Marshall Pierce
2017-10-13T14:10:15
Add quantile iteration output to CLI example
diff --git a/examples/cli.rs b/examples/cli.rs index f608921..74471c2 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -3,17 +3,20 @@ extern crate hdrsample; extern crate clap; -use std::io::BufRead; +use std::io; +use std::io::{Write, BufRead}; +use std::fmt::Display; use clap::{App, Arg, SubCommand}; -u...
1
140
17
1ccd8aa418027f727a3b12aa02fa263be5b57670
Soeren Roerden
2017-10-11T19:05:53
Some reorganization and cleanup
diff --git a/src/core/counter.rs b/src/core/counter.rs new file mode 100644 index 0000000..3048136 --- /dev/null +++ b/src/core/counter.rs @@ -0,0 +1,44 @@ +use num; + +/// This trait represents the operations a histogram must be able to perform on the underlying +/// counter type. The `ToPrimitive` trait is needed to ...
13
135
128
f14bd3c6f695f93f7d940a593a0e4545a359c579
Jon Gjengset
2017-10-10T17:12:36
Release 5.1.0 Note a slight backwards incompatibility for serialized histograms: https://github.com/jonhoo/hdrsample/pull/63#issuecomment-335450034
diff --git a/Cargo.toml b/Cargo.toml index 4e9a4f2..7bc2ff4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrsample" -version = "5.0.0" +version = "5.1.0" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
baac1c2905e114ba3d9c92af8b902d29370d4af6
Marshall Pierce
2017-10-10T16:24:50
Use required-features to reduce the cfg mess. Also, rename the example to `cli` and use a subcommand since I already have other ideas for things to add.
diff --git a/Cargo.toml b/Cargo.toml index 221e076..4e9a4f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,3 +46,7 @@ debug=true [profile.bench] debug=true + +[[example]] +name = "cli" +required-features = ["serialization"] diff --git a/examples/cli.rs b/examples/cli.rs new file mode 100644 index 0000000..f608921 ...
4
84
86
3838638afe7a5fbab9a5baaa88ccb28b7b5e1c24
Marshall Pierce
2017-10-10T12:15:53
Tweak to work when serialization feature is off. Also add auto resize to CLI.
diff --git a/examples/serialize_from_stdin.rs b/examples/serialize_from_stdin.rs index db400cd..fd52004 100644 --- a/examples/serialize_from_stdin.rs +++ b/examples/serialize_from_stdin.rs @@ -1,61 +1,84 @@ /// Reads numbers from stdin, one per line, and writes them to a serialized histogram on stdout. -extern crate...
2
119
92
b0c1ce3f2e203d7e47047b0683d5595f5c337882
Marshall Pierce
2017-09-26T14:02:26
Fix edge case in test This would occasionally cause a panic in a quantile test.
diff --git a/tests/data_access.rs b/tests/data_access.rs index 7d1e9a9..06aa055 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -890,13 +890,17 @@ fn next_value_nonzero_count<C: Counter>(h: &Histogram<C>, start_value: u64) -> u fn prev_value_nonzero_count<C: Counter>(h: &Histogram<C>, start_value: ...
1
6
2
993b1eec0af0640f8c4cff76bc1e23ed652ceb4e
Marshall Pierce
2017-09-20T01:32:18
Tidy up quantile changes
diff --git a/src/iterators/mod.rs b/src/iterators/mod.rs index f847ef2..1beb15d 100644 --- a/src/iterators/mod.rs +++ b/src/iterators/mod.rs @@ -1,8 +1,8 @@ use Counter; use Histogram; -/// An iterator that iterates over histogram percentiles. -pub mod percentile; +/// An iterator that iterates over histogram quant...
5
152
191
3ece315a3ae2ea65e2c20cd54bb8ece18f059dd5
Jon Gjengset
2017-09-17T00:04:05
Release 5.0
diff --git a/Cargo.toml b/Cargo.toml index a95bd71..e5aa484 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "hdrsample" -version = "4.0.0" +version = "5.0.0" description = "A port of HdrHistogram to Rust" readme = "README.md" -authors = ["Jon Gjengset <jon@thesquareplanet.com>"] +aut...
1
5
2
5d7dfdd84cb6ce599e5666d9db41d6eac8be010e
Dan Burkert
2017-09-16T18:55:37
Replace num dependency with num-traits Only the traits are used, so this skips pulling in unrelated bignum crates.
diff --git a/Cargo.toml b/Cargo.toml index a4cc62f..ada4c13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ travis-ci = { repository = "jonhoo/hdrsample" } bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code [dependencies] -num = "0.1" +num-tr...
3
4
4
c360a4c47dce972b76576a29c83c7809eea189e6
Marshall Pierce
2017-08-30T16:56:08
Better parameter name in subtract()
diff --git a/src/lib.rs b/src/lib.rs index d6f29b5..e98f45e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -634,8 +634,8 @@ impl<T: Counter> Histogram<T> { /// Subtract the contents of another histogram from this one. /// /// See `SubtractionError` for error conditions. - pub fn subtract<B: Borrow<Histog...
1
2
2
7af2d0e74b366305594a696fd6caa559744e6611
Marshall Pierce
2017-08-27T17:58:27
Add TODOs on places that could use RangeInclusive
diff --git a/src/lib.rs b/src/lib.rs index 2910617..7a2c62e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1227,6 +1227,7 @@ impl<T: Counter> Histogram<T> { let target_index = self.index_for_or_last(value); // TODO panic on bad index + // TODO use RangeInclusive when it's stable to avoid checke...
2
3
0
25196ef590fe10a05516f4f7455be795997c37dc
Marshall Pierce
2017-08-19T01:34:55
Avoid a few Result return types where not really needed. It's pretty reasonable (and compatible with Java impl) to simply clamp over-large values to the maximum possible value, which also neatly allows us to avoid bailing for usize-related issues.
diff --git a/src/lib.rs b/src/lib.rs index 6c6ccf3..2910617 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -439,6 +439,14 @@ impl<T: Counter> Histogram<T> { return index.to_usize(); } + /// Find the bucket the given value should be placed in. + /// If the value is bigger than what this histogram can ...
5
169
111
d8cc806cfc1fe635ea0300c1b93a8c88fcc2c43c
Marshall Pierce
2017-08-24T22:35:56
Don't use `prev()` in calculating the quantile count.
diff --git a/Cargo.toml b/Cargo.toml index 4dca35b..abc2ceb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,11 +26,11 @@ bench_private = [] # for enabling nightly-only feature(test) on the main crate t num = "0.1" byteorder = "1.0.0" flate2 = "0.2.17" -ieee754 = "0.2.2" [dev-dependencies] rand = "0.3.15" rug = ...
4
9
12
026ab71d354c3d91f072f15c427625c70d793cf9
Marshall Pierce
2017-08-24T17:31:19
Improve quantile tests
diff --git a/tests/data_access.rs b/tests/data_access.rs index 84ce34b..a4325c4 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -7,6 +7,7 @@ extern crate rug; use hdrsample::Histogram; +use std::fmt; use rand::Rng; use rand::distributions::range::Range; use rand::distributions::IndependentSample...
1
129
194
772d22537734f069cbf265ba49cf47b84ef8aa0a
Marshall Pierce
2017-08-22T19:21:21
Switch to counting mismatches in tests to make it possible to know the extent of wrongness of a particular flavor of FP arithmetic.
diff --git a/tests/data_access.rs b/tests/data_access.rs index c572494..84ce34b 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -567,6 +567,7 @@ fn value_at_quantile_matches_pctile_iter_sequence() { let mut h = Histogram::<u64>::new_with_bounds(1, u64::max_value(), 3).unwrap(); let lengths =...
1
33
14
2b093004f4635b674dd30ba039576df6539b615c
Marshall Pierce
2017-08-22T14:18:59
Test different floating-point methods of calculating the quantile count vs rational arithmetic
diff --git a/tests/data_access.rs b/tests/data_access.rs index 0927ae7..c572494 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -821,6 +821,51 @@ fn quantile_count_product_fp_error() { assert!(false); } +#[test] +fn quantile_count_product_fp_rounding() { + // compare different fp approaches t...
1
84
0
5f5f6aed465e35de9f4ec607c6fdf1f5c7f29086
Marshall Pierce
2017-08-22T13:37:32
Add test exploring how often a floating point multiplication by an int cast to an f64 is too high, too low, or the same as doing the calculation with rational arithmetic and then casting.
diff --git a/tests/data_access.rs b/tests/data_access.rs index 41c02b0..0927ae7 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -785,6 +785,42 @@ fn quantile_count_rational_arithmetic_vs_fp() { assert_eq!(0, errors); } +#[test] +fn quantile_count_product_fp_error() { + // how often is multipl...
1
36
0
779cfaf095f5548e8e6c5597a42b8465fecb4ce0
Marshall Pierce
2017-08-21T17:58:38
Add some tests exploring the behavior of prev-ing the quantile vs the quantile count
diff --git a/Cargo.toml b/Cargo.toml index 341694d..4dca35b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ ieee754 = "0.2.2" [dev-dependencies] rand = "0.3.15" +rug = "0.6.0" [lib] path = "src/lib.rs" diff --git a/tests/data_access.rs b/tests/data_access.rs index dfe2626..41c02b0 100644 --- a/tests/...
2
109
4
d9949cdf8095dd1158afa0698e7d37c10c8d1008
Marshall Pierce
2017-08-21T14:39:06
Move quantile tests into data_access.rs
diff --git a/tests/data_access.rs b/tests/data_access.rs index 98e4bea..dfe2626 100644 --- a/tests/data_access.rs +++ b/tests/data_access.rs @@ -1,9 +1,14 @@ //! Tests from HistogramDataAccessTest.java extern crate hdrsample; +extern crate rand; +extern crate ieee754; use hdrsample::Histogram; +use rand::Rng; ...
2
232
187
0c8d050c2ca2b7d7fc05fd18bf10227359e08bfc
Marshall Pierce
2017-08-19T01:11:52
Fix compiler warning with recent nightly
diff --git a/src/lib.rs b/src/lib.rs index 80c6bf4..01b2a9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1349,7 +1349,7 @@ impl<T: Counter> Histogram<T> { /// Returns an error if the index doesn't exist. fn set_count_at_index(&mut self, index: usize, count: T) -> Result<(), ()> { - let mut r = self.c...
1
1
1
b130343fcc597cc3c843a744c0288a46b841f919
Marshall Pierce
2017-08-19T00:53:08
Use saturating math to avoid a couple TODOs. Also, use u64 when summing counts for better accuracy.
diff --git a/src/lib.rs b/src/lib.rs index 80c6bf4..03191fd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1216,11 +1216,11 @@ impl<T: Counter> Histogram<T> { } let target_index = cmp::min(self.index_for(value).ok_or(())?, self.last()); - // TODO overflow // TODO panic on bad index - ...
2
31
7
54e0ba4a2883b782c00ccdc9a8aac7e099e9c548
Marshall Pierce
2017-08-18T19:31:46
Make randomized tests use smaller histogram sizes because the tests are taking annoyingly long.
diff --git a/tests/histogram.rs b/tests/histogram.rs index 4308206..4043c22 100644 --- a/tests/histogram.rs +++ b/tests/histogram.rs @@ -1045,7 +1045,8 @@ fn value_at_quantile_matches_value_sequence() { fn value_at_quantile_matches_pctile_iter_random() { let mut h = Histogram::<u64>::new_with_bounds(1, u64::max_v...
1
3
2
ce9d02602cb24c39df745e36cf73688afc1cbae7
Marshall Pierce
2017-08-18T19:21:25
Add some randomized tests, one of which quickly fails :(
diff --git a/src/lib.rs b/src/lib.rs index 36d5798..4df0412 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1184,7 +1184,7 @@ impl<T: Counter> Histogram<T> { // round to nearest let fractional_count = quantile * self.total_count as f64; - let mut count_at_quantile =fractional_count.prev().ceil()...
2
85
12
20b315435733ed43ffb64ad3d8dd7824198923fb
Marshall Pierce
2017-08-16T23:48:15
Small test tweak
diff --git a/tests/histogram.rs b/tests/histogram.rs index 24f1732..3fe7f88 100644 --- a/tests/histogram.rs +++ b/tests/histogram.rs @@ -3,6 +3,7 @@ extern crate hdrsample; extern crate num; extern crate rand; +extern crate ieee754; use self::rand::Rng; @@ -12,6 +13,7 @@ use std::borrow::Borrow; use std::cmp; ...
1
11
3
a0dfd1f2622893b3928481fc732e4a14c41b98f8
Marshall Pierce
2017-08-16T23:37:56
Add direct value/quantile calculation test from Java impl
diff --git a/tests/histogram.rs b/tests/histogram.rs index 0593c72..24f1732 100644 --- a/tests/histogram.rs +++ b/tests/histogram.rs @@ -1001,3 +1001,26 @@ fn value_at_quantile_matches_pctile_iter() { } } } + +#[test] +fn value_at_quantile_matches_pctile() { + let mut h = Histogram::<u64>::new_with_bo...
1
23
0
2501ae4f40bbc4c78a49867c938d9d37667d93f2
Marshall Pierce
2017-08-15T20:08:37
Port updated percentage logic from 5c7226c thru abb45f6
diff --git a/Cargo.toml b/Cargo.toml index a4cc62f..341694d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,7 @@ bench_private = [] # for enabling nightly-only feature(test) on the main crate t num = "0.1" byteorder = "1.0.0" flate2 = "0.2.17" +ieee754 = "0.2.2" [dev-dependencies] rand = "0.3.15" diff --gi...
3
90
1
db8a9153b6c42fe12fbdcef5bc9eeb3131158a0f
Jon Gjengset
2017-05-05T16:10:25
Bump version to 4.0.0
diff --git a/Cargo.toml b/Cargo.toml index 0506d77..a4cc62f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdrsample" -version = "3.0.0" +version = "4.0.0" description = "A port of HdrHistogram to Rust" readme = "README.md"
1
1
1
50a9ed6800b46ba3c7d1cf7a8dfd9d7b0b9c7254
Marshall Pierce
2017-04-13T15:12:21
Report errors when `usize` overflows. This makes it now safe to use on 16-bit systems, with one small exception in V2DeflateSerializer. This necessitated adding a few error types to things that used to overflow. Various other little cleanups performed while following the logic around. Fixes #32.
diff --git a/src/iterators/mod.rs b/src/iterators/mod.rs index d97dc79..6614f50 100644 --- a/src/iterators/mod.rs +++ b/src/iterators/mod.rs @@ -19,9 +19,9 @@ pub mod all; /// A trait for designing an subset iterator over values in a `Histogram`. pub trait PickyIterator<T: Counter> { /// should an item be yielde...
9
195
108
e0a7a448955eb9d73761078857b2366d022ae6df
Marshall Pierce
2017-04-12T04:34:55
Only support u8-u64 as counter types. Fixes #29.
diff --git a/src/iterators/mod.rs b/src/iterators/mod.rs index d5fa979..d97dc79 100644 --- a/src/iterators/mod.rs +++ b/src/iterators/mod.rs @@ -160,7 +160,7 @@ impl<'a, T: 'a, P> Iterator for HistogramIterator<'a, T, P> // maintain total count so we can yield percentiles // ...
4
49
28
43ff7d518cd3a37fc676ca9380f2cbfa175b8897
Marshall Pierce
2017-04-11T23:14:45
Split alter_n into dedicated add and subtract logic.
diff --git a/benches/record.rs b/benches/record.rs index ba37c58..a906441 100644 --- a/benches/record.rs +++ b/benches/record.rs @@ -128,15 +128,16 @@ fn do_subtract_benchmark<F: Fn() -> Histogram<u64>>(b: &mut Bencher, count_at_ea let r = rng.gen(); h.record_n(r, count_at_each_addend_value).u...
3
361
74
946c28f59aff4c9d24273ab2894077631e58a073
Marshall Pierce
2017-04-06T17:42:45
Share internal serializer interface via the rather blunt means of include!()
diff --git a/benches/serialization.rs b/benches/serialization.rs index dc81154..3474354 100644 --- a/benches/serialization.rs +++ b/benches/serialization.rs @@ -174,29 +174,4 @@ fn do_deserialize_bench<S>(b: &mut Bencher, s: &mut S, low: u64, high: u64, digi }); } -// Maybe someday there will be an obvious righ...
3
28
52
3061676d73721bf298969f0d88875a846499ada5
Marshall Pierce
2017-04-06T16:14:01
Better comments & other PR feedback
diff --git a/src/serialization/serialization.rs b/src/serialization/serialization.rs index 518ab1d..f0e9e4a 100644 --- a/src/serialization/serialization.rs +++ b/src/serialization/serialization.rs @@ -31,7 +31,9 @@ //! //! V2 + DEFLATE is significantly slower to serialize (around 10x) but only a little bit slower to ...
2
13
6
ba76d87b945e2f0af5b177234bc6bfeed7c2b8d1
Marshall Pierce
2017-03-18T14:13:51
V2 + Deflate serialization support with flate2's stream wrappers
diff --git a/Cargo.toml b/Cargo.toml index d2b255d..4e17db9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ bench_private = [] # for enabling nightly-only feature(test) on the main crate t [dependencies] num = "0.1" byteorder = "1.0.0" +flate2 = "0.2.17" #criterion = { git = "https://github.com/japaric/c...
7
285
65
e1857a2ec811c500933843ab6e8aa5bea4a5ff86
Marshall Pierce
2017-03-18T20:47:06
Fix occasional test failures caused by incorrect min value tracking
diff --git a/src/lib.rs b/src/lib.rs index f3ad56b..47aba4f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -173,7 +173,7 @@ const ORIGINAL_MAX: u64 = 0; /// of percentiles. pub trait Counter : num::Num + num::ToPrimitive + num::FromPrimitive + num::Saturating + num::CheckedSub - + num::CheckedAdd + Copy + Partia...
4
55
12
69a37a5f8eaa3fcc6c51d86f6f308af93b1afed4
Marshall Pierce
2017-03-16T18:18:02
Remove TODO about header i/o: didn't show up anywhere in profiling
diff --git a/src/serialization/deserializer.rs b/src/serialization/deserializer.rs index eac2104..a472298 100644 --- a/src/serialization/deserializer.rs +++ b/src/serialization/deserializer.rs @@ -55,8 +55,6 @@ impl Deserializer { /// bytes already in slice or `Vec` form. pub fn deserialize<T: Counter, R: Rea...
1
0
2
341a5e47176c1f89e864cdbbe55fea52de17c59a
Marshall Pierce
2017-03-16T17:19:53
Remove TODO about using leading zero count instead of mask. Leading zeros are unambiguously slower. mask: test serialization::benchmarks::varint_read_rand ... bench: 16,619,389 ns/iter (+/- 1,401,991) test serialization::benchmarks::varint_read_rand_1_byte ... bench: 2,135,169 ns/iter (+/- 42,06...
diff --git a/src/serialization/deserializer.rs b/src/serialization/deserializer.rs index 35ef33b..eac2104 100644 --- a/src/serialization/deserializer.rs +++ b/src/serialization/deserializer.rs @@ -230,7 +230,6 @@ fn low_7_bits(b: u8) -> u64 { #[inline] fn is_high_bit_set(b: u8) -> bool { - // TODO benchmark lead...
1
0
1
544302049cfa308680723b31295232b78628b121
Marshall Pierce
2017-03-16T17:05:33
Use resize() on counts array. Speeds up huge histogram deser by 7%, tiny by 2x, and medium by >3x.
diff --git a/src/lib.rs b/src/lib.rs index 0bb8e9c..f3ad56b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,6 +155,7 @@ extern crate num; use std::borrow::Borrow; use std::cmp; use std::ops::{Index, IndexMut, AddAssign, SubAssign}; +use num::ToPrimitive; use iterators::HistogramIterator; @@ -736,9 +737,9 @@ im...
1
6
10
b54dd102ea2d2ca8eed59ba5cc5e3102ab394c79
Marshall Pierce
2017-03-16T16:44:12
Collapse duplicated loop bodies into a helper struct; no performance impact
diff --git a/src/serialization/deserializer.rs b/src/serialization/deserializer.rs index c2672eb..35ef33b 100644 --- a/src/serialization/deserializer.rs +++ b/src/serialization/deserializer.rs @@ -2,6 +2,7 @@ use super::V2_COOKIE; use super::super::{Counter, Histogram, RestatState}; use super::super::num::ToPrimitive...
1
46
40