[][src]Struct holochain_metrics::stats::StatsRecord

pub struct StatsRecord {
    pub metric: Option<String>,
    pub stream_id: Option<String>,
    pub max: f64,
    pub min: f64,
    pub cnt: f64,
    pub mean: f64,
    pub variance: f64,
    pub stddev: f64,
}

A statistical record, useful for serialization and display purposes.

Fields

metric: Option<String>stream_id: Option<String>max: f64min: f64cnt: f64mean: f64variance: f64stddev: f64

Methods

impl StatsRecord[src]

pub fn new<S: Into<Option<String>>, S2: Into<Option<String>>, D: DescriptiveStats>(
    stream_id: S,
    metric: S2,
    desc: D
) -> Self
[src]

pub fn from_reader(
    read: &mut dyn Read
) -> Result<HashMap<String, Box<dyn DescriptiveStats>>, Box<dyn Error>>
[src]

Produces a hash map of descriptive statistics from read keyed by metric name.

Trait Implementations

impl Clone for StatsRecord[src]

impl Debug for StatsRecord[src]

impl Default for StatsRecord[src]

impl DescriptiveStats for StatsRecord[src]

impl<'de> Deserialize<'de> for StatsRecord[src]

impl From<OnlineStats> for StatsRecord[src]

impl Serialize 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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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>,