Struct prometheus::local::LocalHistogramTimer
source · pub struct LocalHistogramTimer { /* private fields */ }
Expand description
An unsync HistogramTimer
.
Implementations§
source§impl LocalHistogramTimer
impl LocalHistogramTimer
sourcepub fn observe_duration(self)
pub fn observe_duration(self)
Observe and record timer duration (in seconds).
It observes the floating-point number of seconds elapsed since the timer started, and it records that value to the attached histogram.
sourcepub fn stop_and_record(self) -> f64
pub fn stop_and_record(self) -> f64
Observe, record and return timer duration (in seconds).
It observes and returns a floating-point number for seconds elapsed since the timer started, recording that value to the attached histogram.
sourcepub fn stop_and_discard(self) -> f64
pub fn stop_and_discard(self) -> f64
Observe and return timer duration (in seconds).
It returns a floating-point number of seconds elapsed since the timer started, without recording to any histogram.
Trait Implementations§
source§impl Debug for LocalHistogramTimer
impl Debug for LocalHistogramTimer
Auto Trait Implementations§
impl !Freeze for LocalHistogramTimer
impl !RefUnwindSafe for LocalHistogramTimer
impl Send for LocalHistogramTimer
impl !Sync for LocalHistogramTimer
impl Unpin for LocalHistogramTimer
impl UnwindSafe for LocalHistogramTimer
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