pub struct RollingAverage { /* private fields */ }
Expand description
Rolling statistics tracker for computing mean, standard deviation, and confidence intervals
Implementations§
Source§impl RollingAverage
impl RollingAverage
pub fn new() -> Self
pub fn add_sample(&mut self, value: f64)
pub fn sample_count(&self) -> usize
pub fn sample_mean(&self) -> f64
pub fn sample_variance(&self) -> f64
pub fn sample_std_dev(&self) -> f64
Sourcepub fn confidence_interval_99(&self) -> Option<(f64, f64)>
pub fn confidence_interval_99(&self) -> Option<(f64, f64)>
Compute 99% confidence interval for the mean using t-distribution approximation
Trait Implementations§
Source§impl Clone for RollingAverage
impl Clone for RollingAverage
Source§fn clone(&self) -> RollingAverage
fn clone(&self) -> RollingAverage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RollingAverage
impl Debug for RollingAverage
Source§impl Default for RollingAverage
impl Default for RollingAverage
Source§impl<'de> Deserialize<'de> for RollingAverage
impl<'de> Deserialize<'de> for RollingAverage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RollingAverage
impl RefUnwindSafe for RollingAverage
impl Send for RollingAverage
impl Sync for RollingAverage
impl Unpin for RollingAverage
impl UnwindSafe for RollingAverage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more