pub struct HotPathProfiler { /* private fields */ }Expand description
Hot path profiler for identifying performance bottlenecks
Implementations§
Source§impl HotPathProfiler
 
impl HotPathProfiler
Sourcepub fn set_enabled(&self, enabled: bool)
 
pub fn set_enabled(&self, enabled: bool)
Enable or disable profiling
Sourcepub fn is_enabled(&self) -> bool
 
pub fn is_enabled(&self) -> bool
Check if profiling is enabled
Sourcepub async fn record(&self, measurement: PerfMeasurement)
 
pub async fn record(&self, measurement: PerfMeasurement)
Record a performance measurement
Sourcepub async fn get_all_stats(&self) -> HashMap<String, PerfStats>
 
pub async fn get_all_stats(&self) -> HashMap<String, PerfStats>
Get statistics for all operations
Sourcepub async fn get_stats(&self, operation: &str) -> Option<PerfStats>
 
pub async fn get_stats(&self, operation: &str) -> Option<PerfStats>
Get statistics for a specific operation
Sourcepub async fn get_hot_paths(&self, limit: usize) -> Vec<PerfStats>
 
pub async fn get_hot_paths(&self, limit: usize) -> Vec<PerfStats>
Get hot path operations (top N by call count)
Sourcepub async fn get_slow_operations(&self, threshold: Duration) -> Vec<PerfStats>
 
pub async fn get_slow_operations(&self, threshold: Duration) -> Vec<PerfStats>
Get slow operations (operations exceeding duration threshold)
Sourcepub async fn generate_report(&self) -> String
 
pub async fn generate_report(&self) -> String
Generate a performance report
Auto Trait Implementations§
impl Freeze for HotPathProfiler
impl !RefUnwindSafe for HotPathProfiler
impl Send for HotPathProfiler
impl Sync for HotPathProfiler
impl Unpin for HotPathProfiler
impl !UnwindSafe for HotPathProfiler
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