pub struct PerformanceAnalyzer { /* private fields */ }Expand description
Performance analyzer for identifying bottlenecks
Implementations§
Source§impl PerformanceAnalyzer
impl PerformanceAnalyzer
Sourcepub fn new(tracker: Arc<PerformanceTracker>) -> Self
pub fn new(tracker: Arc<PerformanceTracker>) -> Self
Create a new performance analyzer
Sourcepub fn identify_slow_operations(&self) -> Vec<(String, f64, f64)>
pub fn identify_slow_operations(&self) -> Vec<(String, f64, f64)>
Identify slow operations (operations exceeding their targets)
Sourcepub fn slowest_operations(&self, limit: usize) -> Vec<OperationMetrics>
pub fn slowest_operations(&self, limit: usize) -> Vec<OperationMetrics>
Get operations sorted by average time (slowest first)
Sourcepub fn most_time_spent(&self, limit: usize) -> Vec<OperationMetrics>
pub fn most_time_spent(&self, limit: usize) -> Vec<OperationMetrics>
Get operations sorted by total time (most time spent)
Auto Trait Implementations§
impl Freeze for PerformanceAnalyzer
impl RefUnwindSafe for PerformanceAnalyzer
impl Send for PerformanceAnalyzer
impl Sync for PerformanceAnalyzer
impl Unpin for PerformanceAnalyzer
impl UnwindSafe for PerformanceAnalyzer
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