Struct prometheus::local::LocalHistogramTimer[][src]

#[must_use =
  "Timer should be kept in a variable otherwise it cannot observe duration"]pub struct LocalHistogramTimer { /* fields omitted */ }

An unsync HistogramTimer.

Implementations

impl LocalHistogramTimer[src]

pub fn observe_duration(self)[src]

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.

pub fn stop_and_record(self) -> f64[src]

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.

pub fn stop_and_discard(self) -> f64[src]

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

impl Debug for LocalHistogramTimer[src]

impl Drop for LocalHistogramTimer[src]

Auto Trait Implementations

impl !RefUnwindSafe for LocalHistogramTimer

impl Send for LocalHistogramTimer

impl !Sync for LocalHistogramTimer

impl Unpin for LocalHistogramTimer

impl UnwindSafe for LocalHistogramTimer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.