pub struct ConversionPerformanceMonitor { /* private fields */ }Expand description
Performance monitor for conversion operations tracking timing and memory
Implementations§
Source§impl ConversionPerformanceMonitor
impl ConversionPerformanceMonitor
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new performance monitor for tracking conversion timing and memory usage
Sourcepub fn start_timing(&mut self)
pub fn start_timing(&mut self)
Start timing a conversion operation
Sourcepub fn end_timing(&mut self)
pub fn end_timing(&mut self)
End timing and record the elapsed duration for the current conversion operation
Sourcepub fn record_memory_usage(&self, bytes: usize)
pub fn record_memory_usage(&self, bytes: usize)
Record memory usage in bytes for performance analysis
Sourcepub fn get_average_conversion_time(&self) -> Duration
pub fn get_average_conversion_time(&self) -> Duration
Get average conversion time across all recorded operations
Sourcepub fn get_memory_stats(&self) -> (usize, usize, f64)
pub fn get_memory_stats(&self) -> (usize, usize, f64)
Get memory statistics including minimum, maximum, and average usage in bytes
Trait Implementations§
Source§impl Debug for ConversionPerformanceMonitor
impl Debug for ConversionPerformanceMonitor
Auto Trait Implementations§
impl Freeze for ConversionPerformanceMonitor
impl RefUnwindSafe for ConversionPerformanceMonitor
impl Send for ConversionPerformanceMonitor
impl Sync for ConversionPerformanceMonitor
impl Unpin for ConversionPerformanceMonitor
impl UnsafeUnpin for ConversionPerformanceMonitor
impl UnwindSafe for ConversionPerformanceMonitor
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> 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