Trait cadence::prelude::Counted
[−]
[src]
pub trait Counted { fn incr(&self, key: &str) -> MetricResult<Counter>; fn decr(&self, key: &str) -> MetricResult<Counter>; fn count(&self, key: &str, count: i64) -> MetricResult<Counter>; }
Trait for incrementing and decrementing counters.
Counters are simple values incremented or decremented by a client. The rates at which these events occur or average values will be determined by the server receiving them. Examples of counter uses include number of logins to a system or requests received.
See the Statsd spec for more information.
Required Methods
fn incr(&self, key: &str) -> MetricResult<Counter>
Increment the counter by 1
fn decr(&self, key: &str) -> MetricResult<Counter>
Decrement the counter by 1
fn count(&self, key: &str, count: i64) -> MetricResult<Counter>
Increment or decrement the counter by the given amount
Implementors
impl Counted for StatsdClient