Struct libreda_db::profile::PerfCounterManager
source · pub struct PerfCounterManager<'a> {
start_time: Instant,
counter: &'a PerfCounter,
}Expand description
Context manager for a performance counter. This is used to track when the measured function exits.
Fields§
§start_time: InstantInstant then the time measurement was started.
counter: &'a PerfCounterImplementations§
source§impl<'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.