Struct micro_kit::metrics::StdCounter
[−]
[src]
pub struct StdCounter { /* fields omitted */ }Naive implementation of a Counter.
Methods
impl StdCounter[src]
fn new() -> Arc<StdCounter>
Create a new StdCounter.
Trait Implementations
impl Default for StdCounter[src]
fn default() -> StdCounter
Returns the "default value" for a type. Read more
impl Counter for StdCounter[src]
fn clear(&self)
Clear the counter, setting the value to 0.
fn inc(&self)
Increment the counter by 1.
fn add(&self, value: usize)
Increment the counter by the given amount. MUST check that v >= 0.
fn snapshot(&self) -> CounterSnapshot
Take a snapshot of the current value for use with a Reporter.