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

  • A histogram that uses atomic 64bit counters for each bucket.
  • A bucket represents a quantized range of values and a count of observations that fall into that range.
  • The configuration of a histogram which determines the bucketing strategy and therefore the relative error and memory utilization of a histogram.
  • A histogram that uses plain 64bit counters for each bucket.
  • A snapshot of a histogram across a time range.

Enums

  • Errors returned for histogram construction and operations.