[−][src]Struct benchlib::benching::BenchVec
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
Auto Trait Implementations
impl RefUnwindSafe for BenchVec
impl Send for BenchVec
impl Sync for BenchVec
impl Unpin for BenchVec
impl UnwindSafe for BenchVec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,