Struct prometheus::Counter
[−]
[src]
pub struct Counter { /* fields omitted */ }Counter is a Metric that represents a single numerical value that only ever
goes up.
Methods
impl Counter[src]
fn new<S: Into<String>>(name: S, help: S) -> Result<Counter>[src]
new creates a Counter with the name and help arguments.
fn with_opts(opts: Opts) -> Result<Counter>[src]
with_opts creates a Counter with the opts options.
fn inc_by(&self, v: f64) -> Result<()>[src]
inc_by increments the given value to the counter. Error if the value is <
0.
fn inc(&self)[src]
inc increments the counter by 1.
fn get(&self) -> f64[src]
get returns the counter value.
fn local(&self) -> LocalCounter[src]
Trait Implementations
impl Clone for Counter[src]
fn clone(&self) -> Counter[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more