Struct prometheus::local::LocalHistogram
source · pub struct LocalHistogram { /* private fields */ }
Expand description
An unsync Histogram
.
Implementations§
source§impl 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) -> Twhere
F: FnOnce() -> T,
pub fn observe_closure_duration<F, T>(&self, f: F) -> Twhere 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§
source§impl Clone for LocalHistogram
impl Clone for LocalHistogram
source§fn clone(&self) -> LocalHistogram
fn clone(&self) -> LocalHistogram
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LocalHistogram
impl Debug for LocalHistogram
source§impl Drop for LocalHistogram
impl Drop for LocalHistogram
source§impl 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§
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