pub struct CounterStats {
pub count: usize,
pub total_ns: u64,
pub average_ns: u64,
pub min_ns: u64,
pub max_ns: u64,
}Expand description
Statistics snapshot from a performance counter
Fields§
§count: usize§total_ns: u64§average_ns: u64§min_ns: u64§max_ns: u64Implementations§
Source§impl CounterStats
impl CounterStats
Sourcepub fn average_us(&self) -> f64
pub fn average_us(&self) -> f64
Convert to microseconds
Sourcepub fn average_ms(&self) -> f64
pub fn average_ms(&self) -> f64
Convert to milliseconds
Sourcepub fn throughput(&self) -> f64
pub fn throughput(&self) -> f64
Get throughput (operations per second)
Trait Implementations§
Source§impl Clone for CounterStats
impl Clone for CounterStats
Source§fn clone(&self) -> CounterStats
fn clone(&self) -> CounterStats
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 CounterStats
impl Debug for CounterStats
impl Copy for CounterStats
Auto Trait Implementations§
impl Freeze for CounterStats
impl RefUnwindSafe for CounterStats
impl Send for CounterStats
impl Sync for CounterStats
impl Unpin for CounterStats
impl UnwindSafe for CounterStats
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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