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]

[src]

new create a Guage with the name and help arguments.

[src]

with_opts create a Guage with the opts options.

impl Gauge
[src]

[src]

set sets the gauge to an arbitrary value.

[src]

inc increments the gauge by 1.

[src]

dec decrements the gauge by 1.

[src]

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

[src]

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

[src]

get returns the gauge value.

Trait Implementations

impl Clone for Gauge
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Collector for Gauge
[src]

[src]

desc returns descriptors for metrics.

[src]

collect collects metrics.