[][src]Struct witchcraft_metrics::Histogram

pub struct Histogram { /* fields omitted */ }

A metric tracking a statistical distribution of values.

The histogram's default reservoir implementation (used by its Default implementation) is the ExponentiallyDecayingReservoir.

Implementations

impl Histogram[src]

pub fn new<R>(reservoir: R) -> Histogram where
    R: Reservoir
[src]

Creates a new histogram using the provided reservoir.

pub fn update(&self, value: i64)[src]

Adds a value to the histogram.

pub fn count(&self) -> u64[src]

Returns the number of values added to the histogram.

pub fn snapshot(&self) -> Box<dyn Snapshot>[src]

Returns a snapshot of the statistical distribution of values.

Trait Implementations

impl Default for Histogram[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,