pub struct PerformanceTracker { /* private fields */ }
Expand description
Simple performance tracker for measuring operation durations
Implementations§
Source§impl PerformanceTracker
impl PerformanceTracker
pub fn new(operation_name: &str) -> Self
pub fn with_context(self, key: &str, value: &str) -> Self
pub fn add_context(&mut self, key: &str, value: &str)
pub fn elapsed(&self) -> Duration
pub fn trace_completion(self)
pub fn trace_completion_with_result<T, E>(self, result: &Result<T, E>)where
E: Display,
Auto Trait Implementations§
impl Freeze for PerformanceTracker
impl RefUnwindSafe for PerformanceTracker
impl Send for PerformanceTracker
impl Sync for PerformanceTracker
impl Unpin for PerformanceTracker
impl UnwindSafe for PerformanceTracker
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