pub struct PerformanceMetrics { /* private fields */ }Expand description
Performance metrics for safer-ring operations.
Implementations§
Source§impl PerformanceMetrics
impl PerformanceMetrics
Sourcepub fn record_operation(&mut self, operation: &str, duration: Duration)
pub fn record_operation(&mut self, operation: &str, duration: Duration)
Record an operation timing.
Sourcepub fn get_average_duration(&self, operation: &str) -> Option<Duration>
pub fn get_average_duration(&self, operation: &str) -> Option<Duration>
Get the average duration for a specific operation type.
Sourcepub fn get_min_duration(&self, operation: &str) -> Option<Duration>
pub fn get_min_duration(&self, operation: &str) -> Option<Duration>
Get the minimum duration for a specific operation type.
Sourcepub fn get_max_duration(&self, operation: &str) -> Option<Duration>
pub fn get_max_duration(&self, operation: &str) -> Option<Duration>
Get the maximum duration for a specific operation type.
Sourcepub fn get_operation_types(&self) -> Vec<String>
pub fn get_operation_types(&self) -> Vec<String>
Get all operation types.
Sourcepub fn get_total_operations(&self) -> u64
pub fn get_total_operations(&self) -> u64
Get total operations across all types.
Sourcepub fn get_collection_duration(&self) -> Duration
pub fn get_collection_duration(&self) -> Duration
Get the duration since metrics collection started.
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate a summary report.
Trait Implementations§
Source§impl Clone for PerformanceMetrics
impl Clone for PerformanceMetrics
Source§fn clone(&self) -> PerformanceMetrics
fn clone(&self) -> PerformanceMetrics
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 PerformanceMetrics
impl Debug for PerformanceMetrics
Auto Trait Implementations§
impl Freeze for PerformanceMetrics
impl RefUnwindSafe for PerformanceMetrics
impl Send for PerformanceMetrics
impl Sync for PerformanceMetrics
impl Unpin for PerformanceMetrics
impl UnwindSafe for PerformanceMetrics
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