pub struct PerformanceLogger { /* private fields */ }Expand description
Performance logger for tracking operation timings
Implementations§
Source§impl PerformanceLogger
impl PerformanceLogger
pub fn new(logger: Arc<Logger>) -> Self
pub fn time_operation<F, R>(&self, name: &str, operation: F) -> Rwhere
F: FnOnce() -> R,
pub fn get_operation_stats(&self, name: &str) -> Option<OperationStats>
pub fn clear_operation_stats(&self, name: &str)
pub fn get_all_operations(&self) -> Vec<String>
Auto Trait Implementations§
impl Freeze for PerformanceLogger
impl !RefUnwindSafe for PerformanceLogger
impl Send for PerformanceLogger
impl Sync for PerformanceLogger
impl Unpin for PerformanceLogger
impl !UnwindSafe for PerformanceLogger
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> 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