Struct metrics::SimpleStat
source · pub struct SimpleStat<T: NumberType> {
count: u64,
sum: T,
min: T,
max: T,
}
Expand description
Light weight stat struct that helps you get aggregate stats like min, max, average, count and sum. Median and standard deviation are intentionally excluded to keep the structure light weight.
Fields§
§count: u64
§sum: T
§min: T
§max: T
Implementations§
source§impl<T: NumberType> SimpleStat<T>
impl<T: NumberType> SimpleStat<T>
Trait Implementations§
source§impl<T: NumberType> Debug for SimpleStat<T>
impl<T: NumberType> Debug for SimpleStat<T>
source§impl<T: NumberType> Default for SimpleStat<T>
impl<T: NumberType> Default for SimpleStat<T>
source§impl<T: PartialEq + NumberType> PartialEq for SimpleStat<T>
impl<T: PartialEq + NumberType> PartialEq for SimpleStat<T>
source§fn eq(&self, other: &SimpleStat<T>) -> bool
fn eq(&self, other: &SimpleStat<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: NumberType> SummaryStats<T> for SimpleStat<T>
impl<T: NumberType> SummaryStats<T> for SimpleStat<T>
impl<T: Eq + NumberType> Eq for SimpleStat<T>
impl<T: NumberType> StructuralPartialEq for SimpleStat<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SimpleStat<T>where
T: RefUnwindSafe,
impl<T> Send for SimpleStat<T>where
T: Send,
impl<T> Sync for SimpleStat<T>where
T: Sync,
impl<T> Unpin for SimpleStat<T>where
T: Unpin,
impl<T> UnwindSafe for SimpleStat<T>where
T: UnwindSafe,
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