Struct metrics_util::Histogram
source · [−]pub struct Histogram { /* private fields */ }
Expand description
A bucketed histogram.
This histogram tracks the number of samples that fall into pre-defined buckets, rather than exposing any sort of quantiles.
This type is most useful with systems that prefer bucketed data, such as Prometheus’ histogram type, as opposed to its summary type, which deals with quantiles.
Implementations
Creates a new Histogram
.
If bounds
is empty, returns None
.
Gets the buckets.
Buckets are tuples, where the first element is the bucket limit itself, and the second element is the count of samples in that bucket.
Records multiple samples.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Histogram
impl UnwindSafe for Histogram
Blanket Implementations
Mutably borrows from an owned value. Read more