pub struct Histogram { /* private fields */ }Expand description
Snapshot of a duration histogram.
Bucket 0 counts durations below 16µs, bucket i counts durations in
[16µs * 2^(i-1), 16µs * 2^i), and the last bucket counts durations of
262.144ms and longer.
Counts are totals since the histogram was created, the distribution over an
interval is the delta of two snapshots.
Implementations§
Source§impl Histogram
impl Histogram
Sourcepub fn bucket_range(idx: usize) -> (Duration, Option<Duration>)
pub fn bucket_range(idx: usize) -> (Duration, Option<Duration>)
Returns the duration range of a bucket.
The lower bound is inclusive, the upper bound is exclusive and None
for the last bucket.
§Panics
Panics if idx is not less than HISTOGRAM_BUCKETS.
Trait Implementations§
impl Copy for Histogram
impl Eq for Histogram
impl StructuralPartialEq for Histogram
Auto Trait Implementations§
impl Freeze for Histogram
impl RefUnwindSafe for Histogram
impl Send for Histogram
impl Sync for Histogram
impl Unpin for Histogram
impl UnsafeUnpin for Histogram
impl UnwindSafe for Histogram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more