pub struct PerformanceCounter { /* private fields */ }Expand description
Performance counter
Implementations§
Source§impl PerformanceCounter
impl PerformanceCounter
Sourcepub fn average_ms(&self) -> f64
pub fn average_ms(&self) -> f64
Returns the average time
Sourcepub fn recent_average_ms(&self) -> f64
pub fn recent_average_ms(&self) -> f64
Returns the recent average (last 100 samples)
Sourcepub fn percentile(&self, p: f64) -> f64
pub fn percentile(&self, p: f64) -> f64
Returns the percentile
Sourcepub fn stats(&self) -> CounterStats
pub fn stats(&self) -> CounterStats
Returns statistics
Trait Implementations§
Source§impl Clone for PerformanceCounter
impl Clone for PerformanceCounter
Source§fn clone(&self) -> PerformanceCounter
fn clone(&self) -> PerformanceCounter
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 moreAuto Trait Implementations§
impl Freeze for PerformanceCounter
impl RefUnwindSafe for PerformanceCounter
impl Send for PerformanceCounter
impl Sync for PerformanceCounter
impl Unpin for PerformanceCounter
impl UnsafeUnpin for PerformanceCounter
impl UnwindSafe for PerformanceCounter
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