Struct prometheus::Gauge [] [src]

pub struct Gauge { /* fields omitted */ }

Gauge is a Metric that represents a single numerical value that can arbitrarily go up and down.

Methods

impl Gauge
[src]

new create a Guage with the name and help arguments.

with_opts create a Guage with the opts options.

impl Gauge
[src]

set sets the gauge to an arbitrary value.

inc increments the gauge by 1.

dec decrements the gauge by 1.

add adds the given value to the gauge. (The value can be negative, resulting in a decrease of the gauge.)

sub subtracts the given value from the gauge. (The value can be negative, resulting in an increase of the gauge.)

get returns the gauge value.

Trait Implementations

impl Clone for Gauge
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Collector for Gauge
[src]

desc returns descriptors for metrics.

collect collects metrics.