pub struct Histogram { /* private fields */ }Expand description
A histogram of observed event magnitudes.
A collected Report will contain a histogram
for each event that was configured to generate one.
Implementations§
Source§impl Histogram
impl Histogram
Sourcepub fn magnitudes(&self) -> impl Iterator<Item = Magnitude>
pub fn magnitudes(&self) -> impl Iterator<Item = Magnitude>
Iterates over the magnitudes of the histogram buckets, in ascending order.
Each bucket counts the number of events that are less than or equal to the corresponding magnitude. Each occurrence of an event is counted only once, in the first bucket that can accept it.
The last bucket always has the magnitude Magnitude::MAX, counting
occurrences that do not fit into any of the previous buckets.
Sourcepub fn counts(&self) -> impl Iterator<Item = u64>
pub fn counts(&self) -> impl Iterator<Item = u64>
Iterates over the count of occurrences in each bucket,
including the last Magnitude::MAX bucket.
Each bucket counts the number of events that are less than or equal to the corresponding magnitude. Each occurrence of an event is counted only once, in the first bucket that can accept it.
Sourcepub fn buckets(&self) -> impl Iterator<Item = (Magnitude, u64)>
pub fn buckets(&self) -> impl Iterator<Item = (Magnitude, u64)>
Iterates over the histogram buckets as (magnitude, count) pairs,
in ascending order of magnitudes.
Each bucket counts the number of events that are less than or equal to the corresponding magnitude. Each occurrence of an event is counted only once, in the first bucket that can accept it.
The last bucket always has the magnitude Magnitude::MAX, counting
occurrences that do not fit into any of the previous buckets.