pub struct SharedExponentialHistogram { /* private fields */ }Expand description
An ExponentialHistogram with interior mutability
Implementations§
Sourcepub fn accumulate(&self, value: f64)
pub fn accumulate(&self, value: f64)
Observe a value, increasing its bucket’s count by 1
Sourcepub fn snapshot(&self) -> ExponentialHistogram
pub fn snapshot(&self) -> ExponentialHistogram
Get the current snapshot of the histogram. This gives you an owned clone of the backing histogram at a point in time, so you can work with it without holding a lock.
Sourcepub fn snapshot_and_reset(&self) -> ExponentialHistogram
pub fn snapshot_and_reset(&self) -> ExponentialHistogram
Get the current snapshot of the histogram. This gives you an owned clone of the backing histogram at a point in time, so you can work with it without holding a lock.
Trait Implementations§
Source§fn clone(&self) -> SharedExponentialHistogram
fn clone(&self) -> SharedExponentialHistogram
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> SharedExponentialHistogram
fn default() -> SharedExponentialHistogram
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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