Struct metered::hdr_histogram::HdrHistogram
source · [−]pub struct HdrHistogram { /* private fields */ }
Expand description
An High-Dynamic Range Histogram
HdrHistograms can record and analyze sampled data in low-latency applications. Read more about HDR Histograms on http://hdrhistogram.org/
This structure uses the hdrhistogram
crate under the hood.
Implementations
sourceimpl HdrHistogram
impl HdrHistogram
sourcepub fn with_bound(max_bound: u64) -> Self
pub fn with_bound(max_bound: u64) -> Self
Instantiates a new HdrHistogram with a max_bound
For instance, a max_bound of 60 * 60 * 1000 will allow to record durations varying from 1 millisecond to 1 hour.
sourcepub fn record(&mut self, value: u64)
pub fn record(&mut self, value: u64)
Records a value to the histogram
This is a saturating record: if the value is higher than max_bound
,
max_bound will be recorded instead.
sourcepub fn min(&self) -> u64
pub fn min(&self) -> u64
Get the lowest recorded value level in the histogram. If the histogram has no recorded values, the value returned will be 0.
sourcepub fn max(&self) -> u64
pub fn max(&self) -> u64
Get the highest recorded value level in the histogram. If the histogram has no recorded values, the value returned is undefined.
Trait Implementations
sourceimpl Clone for HdrHistogram
impl Clone for HdrHistogram
sourcefn clone(&self) -> HdrHistogram
fn clone(&self) -> HdrHistogram
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HdrHistogram
impl Debug for HdrHistogram
sourceimpl Serialize for HdrHistogram
impl Serialize for HdrHistogram
Auto Trait Implementations
impl RefUnwindSafe for HdrHistogram
impl Send for HdrHistogram
impl Sync for HdrHistogram
impl Unpin for HdrHistogram
impl UnwindSafe for HdrHistogram
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more