Struct libreda_db::profile::PerfCounterManager
source · [−]pub struct PerfCounterManager<'a> {
start_time: Instant,
counter: &'a mut PerfCounter,
}
Expand description
Context manager for a performance counter. This is used to track when the measured function exits.
Fields
start_time: Instant
Instant then the time measurement was started.
counter: &'a mut PerfCounter
Implementations
sourceimpl<'a> PerfCounterManager<'a>
impl<'a> PerfCounterManager<'a>
sourcefn stop_measurement(self)
fn stop_measurement(self)
Stop measuring the time and add the duration to the total spent time.
Auto Trait Implementations
impl<'a> RefUnwindSafe for PerfCounterManager<'a>
impl<'a> Send for PerfCounterManager<'a>
impl<'a> Sync for PerfCounterManager<'a>
impl<'a> Unpin for PerfCounterManager<'a>
impl<'a> !UnwindSafe for PerfCounterManager<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more