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 Freeze for Snapshot
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