Expand description
An implementation of the OpenHistogram log-linear histogram specification.
Use this crate for high-performance, high-volume measurement recording and analysis.
§Examples
ⓘ
// Create a new empty histogram
let mut perf = openhistogram::Histogram::new();
// Instrument a function
fn some_interesting_function() {
let start = std::time::Instant::now();
// do some work
let finish = std::time::Instant::now();
perf.insert(finish.duration_since(start), 1);
}
// Analyze
println!("Average call time: {}s, 99th-percentile: {}s", perf.mean(), perf.quantile1(&[0.99])?[0]);Structs§
- Bin
- A Bin represent a log(10)-linear range in some unitless value domain.
- Histogram
- A distribution histogram containing sample counts in base 10 log-linear Bins.
Enums§
- Error
- Quantile
Type - The QuantileType represents various methodologies for calculating quantiles.