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]

[src]

new creates a Counter with the name and help arguments.

[src]

with_opts creates a Counter with the opts options.

[src]

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

[src]

inc increments the counter by 1.

[src]

get returns the counter value.

[src]

Trait Implementations

impl Clone for Counter
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Collector for Counter
[src]

[src]

desc returns descriptors for metrics.

[src]

collect collects metrics.