pub type IntCounter = GenericCounter<AtomicU64>;
Expand description
The integer version of Counter
. Provides better performance if metric values
are all positive integers (natural numbers).
Aliased Type§
struct IntCounter { /* private fields */ }
Implementations
Source§impl<P: Atomic> GenericCounter<P>
impl<P: Atomic> GenericCounter<P>
Sourcepub fn new<S1: Into<String>, S2: Into<String>>(
name: S1,
help: S2,
) -> Result<Self>
pub fn new<S1: Into<String>, S2: Into<String>>( name: S1, help: S2, ) -> Result<Self>
Create a GenericCounter
with the name
and help
arguments.
Sourcepub fn with_opts(opts: Opts) -> Result<Self>
pub fn with_opts(opts: Opts) -> Result<Self>
Create a GenericCounter
with the opts
options.
Sourcepub fn local(&self) -> GenericLocalCounter<P>
pub fn local(&self) -> GenericLocalCounter<P>
Return a GenericLocalCounter
for single thread usage.