Trait cadence::Metered [] [src]

pub trait Metered {
    fn mark(&self, key: &str) -> MetricResult<Meter>;
    fn meter(&self, key: &str, value: u64) -> MetricResult<Meter>;
}

Trait for recording meter values.

Meter values measure the rate at which events occur. These rates are determined by the server, the client simply indicates when they happen. Meters can be thought of as increment-only counters. Examples include things like number of requests handled or number of times something is flushed to disk.

See the Statsd spec for more information.

Required Methods

Record a single metered event with the given key

Record a meter value with the given key

Implementors