Struct prometheus::local::LocalHistogram
[−]
[src]
pub struct LocalHistogram { /* fields omitted */ }
LocalHistogram
is used for performance and in single-thread.
Sometimes, if you very care the performance, you can use the LocalHistogram
and then flush the metric interval.
Methods
impl LocalHistogram
[src]
fn observe(&self, v: f64)
[src]
observe
adds a single observation to the Histogram
.
fn start_timer(&self) -> LocalHistogramTimer
[src]
start_timer
returns a LocalHistogramTimer
to track a duration.
fn clear(&self)
[src]
clear
clears the local metric.
fn flush(&self)
[src]
flush
flushes the local metric to the Histogram metric.
Trait Implementations
impl Clone for LocalHistogram
[src]
fn clone(&self) -> LocalHistogram
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more