pub struct PerformanceProfiler { /* private fields */ }
Expand description
Performance profiler for container operations
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable or disable profiling
Sourcepub fn record_resolution_time(&mut self, service_name: &str, duration: Duration)
pub fn record_resolution_time(&mut self, service_name: &str, duration: Duration)
Record a service resolution time
Sourcepub fn record_memory_snapshot(&mut self, memory_usage: usize)
pub fn record_memory_snapshot(&mut self, memory_usage: usize)
Record a memory snapshot
Sourcepub fn get_metrics(&self) -> PerformanceMetrics
pub fn get_metrics(&self) -> PerformanceMetrics
Get performance metrics
Sourcepub fn get_slowest_resolutions(&self, count: usize) -> Vec<(String, Duration)>
pub fn get_slowest_resolutions(&self, count: usize) -> Vec<(String, Duration)>
Get slowest resolutions
Trait Implementations§
Source§impl Debug for PerformanceProfiler
impl Debug for PerformanceProfiler
Auto Trait Implementations§
impl Freeze for PerformanceProfiler
impl RefUnwindSafe for PerformanceProfiler
impl Send for PerformanceProfiler
impl Sync for PerformanceProfiler
impl Unpin for PerformanceProfiler
impl UnwindSafe for PerformanceProfiler
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