pub struct ExecutionTimer { /* private fields */ }
Expand description
Execution timing helper for measuring performance
Implementations§
Source§impl ExecutionTimer
impl ExecutionTimer
Sourcepub fn with_label(label: String) -> Self
pub fn with_label(label: String) -> Self
Create a labeled execution timer
Sourcepub fn elapsed_ms(&self) -> f64
pub fn elapsed_ms(&self) -> f64
Get elapsed time in milliseconds
Sourcepub fn elapsed_us(&self) -> f64
pub fn elapsed_us(&self) -> f64
Get elapsed time in microseconds
Sourcepub fn elapsed_ns(&self) -> u64
pub fn elapsed_ns(&self) -> u64
Get elapsed time in nanoseconds
Sourcepub fn to_sample(
&self,
processor_type: ProcessorType,
processor_id: String,
) -> PerformanceSample
pub fn to_sample( &self, processor_type: ProcessorType, processor_id: String, ) -> PerformanceSample
Create a performance sample from this timer
Trait Implementations§
Source§impl Debug for ExecutionTimer
impl Debug for ExecutionTimer
Auto Trait Implementations§
impl Freeze for ExecutionTimer
impl RefUnwindSafe for ExecutionTimer
impl Send for ExecutionTimer
impl Sync for ExecutionTimer
impl Unpin for ExecutionTimer
impl UnwindSafe for ExecutionTimer
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> 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