[][src]Struct benchlib::benching::BenchVec

pub struct BenchVec {
    pub inner: Vec<Duration>,
}

Fields

inner: Vec<Duration>

Methods

impl BenchVec[src]

A struct that stores a vector of Durations for benchmarks and allows some statistical operations on it

pub fn new() -> Self[src]

Creates a new empty BenchVec

pub fn from_vec(vec: &Vec<Duration>) -> Self[src]

Creates a BenchVec from an existing vector of Durations

pub fn push(&mut self, item: Duration) -> &mut Self[src]

Adds an element to the BenchVec

pub fn append(&mut self, other: Self) -> &mut Self[src]

Appends a different BenchVec to this one

pub fn len(&self) -> usize[src]

Returns the length of stored elements

pub fn sum(&self) -> Duration[src]

Returns the sum of all stored elements

pub fn average(&self) -> Duration[src]

Returns the average of all durations

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

Returns the standard deviation of all durations

pub fn compare(&self, other: Self) -> DurationDifference[src]

Compares two benchmarks by calculating the average

Trait Implementations

impl Clone for BenchVec[src]

impl Debug for BenchVec[src]

impl Display for BenchVec[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.