Trait micro_kit::metrics::Counter [] [src]

pub trait Counter: Send + Sync {
    fn clear(&self);
fn inc(&self);
fn add(&self, value: usize);
fn snapshot(&self) -> CounterSnapshot; }

Counter is a Metric that represents a single numerical value that can increases over time.

Required Methods

Clear the counter, setting the value to 0.

Increment the counter by 1.

Increment the counter by the given amount. MUST check that v >= 0.

Take a snapshot of the current value for use with a Reporter.

Implementors