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<String, String>
Accesses scoping labels.
fn labeled(self, k: String, v: String) -> Scope
Adds a label into scope (potentially overwriting).
fn counter(&self, name: String) -> Counter
Creates a Counter with the given name.
fn gauge(&self, name: String) -> Gauge
Creates a Gauge with the given name.
fn stat(&self, name: String) -> Stat
Creates a Stat with the given name.
The underlying histogram is automatically resized as values are added.
fn stat_with_bounds(&self, name: String, 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