Struct prometheus::Counter [] [src]

pub struct Counter {
    // some fields omitted
}

Counter is a Metric that represents a single numerical value that only ever goes up.

Methods

impl Counter
[src]

new creates a Counter with the name and help arguments.

with_opts creates a Counter with the opts options.

inc_by increments the given value to the counter. Error if the value is < 0.

inc increments the counter by 1.

get returns the counter value.

Trait Implementations

impl Clone for Counter
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Collector for Counter
[src]

desc returns the descriptor for the metric collector.

collect collects the metric.