Struct exponential_decay_histogram::Snapshot
source · pub struct Snapshot { /* private fields */ }
Expand description
A snapshot of the state of an ExponentialDecayHistogram
at some point in time.
Implementations§
source§impl Snapshot
impl Snapshot
sourcepub fn value(&self, quantile: f64) -> i64
pub fn value(&self, quantile: f64) -> i64
Returns the value at a specified quantile in the snapshot, or 0 if it is empty.
For example, snapshot.value(0.5)
returns the median value of the
snapshot.
Panics
Panics if quantile
is not between 0 and 1 (inclusive).
sourcepub fn stddev(&self) -> f64
pub fn stddev(&self) -> f64
Returns the standard deviation of the values in the snapshot, or 0 if it is empty.
Auto Trait Implementations§
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
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