[][src]Trait witchcraft_metrics::Snapshot

pub trait Snapshot: 'static + Sync + Send {
    pub fn value(&self, quantile: f64) -> f64;
pub fn max(&self) -> i64;
pub fn min(&self) -> i64;
pub fn mean(&self) -> f64;
pub fn stddev(&self) -> f64; }

Statistics about a set of values.

Required methods

pub fn value(&self, quantile: f64) -> f64[src]

Returns the value at the specified quantile (from 0 to 1 inclusive), or 0 if empty.

For example, snapshot.value(0.5) returns the median value.

Panics

Panics if quantile is less than 0 or greater than 1.

pub fn max(&self) -> i64[src]

Returns the maximum value in the snapshot, or 0 if empty.

pub fn min(&self) -> i64[src]

Returns the minimum value in the snapshot, or 0 if empty.

pub fn mean(&self) -> f64[src]

Returns the average value in the snapshot, or 0 if empty.

pub fn stddev(&self) -> f64[src]

Returns the standard deviation of the values in the snapshot.

Loading content...

Implementations on Foreign Types

impl Snapshot for Snapshot[src]

Loading content...

Implementors

Loading content...