Struct tacho::Scope
[−]
[src]
pub struct Scope { /* fields omitted */ }
Supports creation of scoped metrics.
Scope
s may be cloned without copying the underlying metrics registry.
Labels may be attached to the scope so that all metrics created by the Scope
are
labeled.
Methods
impl Scope
[src]
fn labels(&self) -> &BTreeMap<&'static str, String>
Accesses scoping labels.
fn labeled<D: Display>(self, k: &'static str, v: D) -> Self
Adds a label into scope (potentially overwriting).
fn prefixed(self, value: &'static str) -> Self
Appends a prefix to the current scope.
fn counter(&self, name: &'static str) -> Counter
Creates a Counter with the given name.
fn gauge(&self, name: &'static str) -> Gauge
Creates a Gauge with the given name.
fn stat(&self, name: &'static str) -> Stat
Creates a Stat with the given name.
The underlying histogram is automatically resized as values are added.
fn timer_us(&self, name: &'static str) -> Timer
fn timer_ms(&self, name: &'static str) -> Timer
fn stat_with_bounds(&self, name: &'static str, low: u64, high: u64) -> Stat
Creates a Stat with the given name and histogram paramters.
Trait Implementations
impl Clone for Scope
[src]
fn clone(&self) -> Scope
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more