Skip to main content

Counter

Type Alias Counter 

Source
pub type Counter = Registered<Raw>;
Expand description

A registered counter metric with a status label.

Aliased Type§

pub struct Counter { /* private fields */ }

Implementations§

Source§

impl Counter

Source

pub fn guard(&self, status: Status) -> CounterGuard

Create a new CounterGuard with a given status.

Source

pub fn inc(&self, status: Status)

Increment the metric with a given status.

Source

pub fn inc_by(&self, status: Status, n: u64)

Increment the metric with a given status.