Crate histogram

Crate histogram 

Source
Expand description

This crate provides histogram implementations that are conceptually similar to HdrHistogram, with modifications to the bucket construction and indexing algorithms that we believe provide a simpler implementation and more efficient runtime compared to the reference implementation of HdrHistogram.

§Goals

  • simple implementation
  • fine-grained configuration
  • efficient runtime

§Background

Please see: https://observablehq.com/@iopsystems/h2histogram

Structs§

AtomicHistogram
A histogram that uses atomic 64bit counters for each bucket.
Bucket
A bucket represents a quantized range of values and a count of observations that fall into that range.
Config
The configuration of a histogram which determines the bucketing strategy and therefore the relative error and memory utilization of a histogram.
Histogram
A histogram that uses plain 64bit counters for each bucket.
SparseHistogram
This histogram is a sparse, columnar representation of the regular Histogram. It is significantly smaller than a regular Histogram when a large number of buckets are zero, which is a frequent occurence. It stores an individual vector for each field of non-zero buckets. Assuming index[0] = n, (index[0], count[0]) corresponds to the nth bucket.

Enums§

Error
Errors returned for histogram construction and operations.