[][src]Struct holochain_metrics::stats::OnlineStats

pub struct OnlineStats { /* fields omitted */ }

An extension of stats::OnlineStats that also incrementally tracks max and min values.

Methods

impl OnlineStats[src]

pub fn map<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(OnlineStats) -> __SHRINKWRAP_T>(
    self,
    f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]

Map a function over the wrapped value, consuming it in the process.

pub fn map_ref<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(&OnlineStats) -> __SHRINKWRAP_T>(
    &self,
    f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]

Map a function over the wrapped value without consuming it.

impl OnlineStats[src]

pub fn empty() -> Self[src]

An initial empty statistic.

pub fn add(&mut self, value: f64)[src]

Adds a value to the running statistic.

Methods from Deref<Target = OnlineStats>

pub fn mean(&self) -> f64

Return the current mean.

pub fn stddev(&self) -> f64

Return the current standard deviation.

pub fn variance(&self) -> f64

Return the current variance.

pub fn len(&self) -> usize

Returns the number of data points.

Trait Implementations

impl AsRef<OnlineStats> for OnlineStats[src]

impl Borrow<OnlineStats> for OnlineStats[src]

impl Clone for OnlineStats[src]

impl Commute for OnlineStats[src]

impl Copy for OnlineStats[src]

impl Debug for OnlineStats[src]

impl Deref for OnlineStats[src]

type Target = OnlineStats

The resulting type after dereferencing.

impl DescriptiveStats for OnlineStats[src]

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

The mean value of the running statistic.

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

The standard deviation of the running statistic.

fn variance(&self) -> f64[src]

The variance of the running statistic.

fn max(&self) -> f64[src]

The max of the running statistic.

fn min(&self) -> f64[src]

The min of the running statistic.

fn cnt(&self) -> f64[src]

The number of samples of the running statistic.

impl From<OnlineStats> for StatsRecord[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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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