Crate hdrhistogram [] [src]

Rust binding for HdrHistogram_c

This crate implements bindings for HdrHistogram_c, a flexible library for recording histograms without having to know very much about the data being histogrammed.

The top-level type is Histogram.

Example

This sets up a histogram to record values in the range 1..1000_000 with 2 significant figures of precision. It then records one count each of 1 and 10, and 40 counts of 100.

let mut h = Histogram::init(1, 1000000, 2).unwrap();
 
h.record_value(1);
h.record_value(10);
h.record_values(100, 40);

assert_eq!(h.total_count(), 42);
assert_eq!(h.min(), 1);
assert_eq!(h.max(), 100);

Structs

CountIterItem

Iterator result producing counts.

F64CountIterItem

Iterator result over F64Histogram containing counts.

F64Histogram

Instance of a histogram recording f64 values.

F64LinearIter

Iterator over F64Histogram producing linear buckets.

F64LogIter

Iterator over F64Histogram producing logarithmic buckets.

F64PercentileIter

Iterator over F64Histogram producing percentiles.

F64PercentileIterItem

Iterator result over F64Histogram containing percentiles.

F64RecordedIter

Iterator over F64Histogram producing recorded samples.

Histogram

Instance of a Histogram.

HistogramErr

Catch-all error return.

LinearIter

Iterator over Histogram producing linear buckets.

LogIter

Iterator over Histogram producing logarithmic buckets.

PercentileIter

Iterator over Histogram producing percentile buckets.

PercentileIterItem

Iterator result producing percentiles.

RecordedIter

Iterator over Histogram producing recorded values.