Struct prometheus::local::LocalHistogram
source · [−]pub struct LocalHistogram { /* private fields */ }
Expand description
An unsync Histogram
.
Implementations
sourceimpl LocalHistogram
impl LocalHistogram
sourcepub fn start_timer(&self) -> LocalHistogramTimer
pub fn start_timer(&self) -> LocalHistogramTimer
Return a LocalHistogramTimer
to track a duration.
sourcepub fn observe_closure_duration<F, T>(&self, f: F) -> T where
F: FnOnce() -> T,
pub fn observe_closure_duration<F, T>(&self, f: F) -> T where
F: FnOnce() -> T,
Observe execution time of a closure, in second.
sourcepub fn get_sample_sum(&self) -> f64
pub fn get_sample_sum(&self) -> f64
Return accumulated sum of local samples.
sourcepub fn get_sample_count(&self) -> u64
pub fn get_sample_count(&self) -> u64
Return count of local samples.
Trait Implementations
sourceimpl Clone for LocalHistogram
impl Clone for LocalHistogram
sourcefn clone(&self) -> LocalHistogram
fn clone(&self) -> LocalHistogram
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LocalHistogram
impl Debug for LocalHistogram
sourceimpl Drop for LocalHistogram
impl Drop for LocalHistogram
sourceimpl LocalMetric for LocalHistogram
impl LocalMetric for LocalHistogram
Auto Trait Implementations
impl !RefUnwindSafe for LocalHistogram
impl Send for LocalHistogram
impl !Sync for LocalHistogram
impl Unpin for LocalHistogram
impl UnwindSafe for LocalHistogram
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more