[][src]Trait witchcraft_metrics::Snapshot

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

Statistics about a set of values.

Required methods

fn value(&self, quantile: f64) -> f64

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.

fn max(&self) -> i64

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

fn min(&self) -> i64

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

fn mean(&self) -> f64

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

fn stddev(&self) -> f64

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...