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]
fn new<S: Into<String>>(name: S, help: S) -> Result<Gauge>[src]
new create a Guage with the name and help arguments.
fn with_opts(opts: Opts) -> Result<Gauge>[src]
with_opts create a Guage with the opts options.
impl Gauge[src]
fn set(&self, v: f64)[src]
set sets the gauge to an arbitrary value.
fn inc(&self)[src]
inc increments the gauge by 1.
fn dec(&self)[src]
dec decrements the gauge by 1.
fn add(&self, v: f64)[src]
add adds the given value to the gauge. (The value can be
negative, resulting in a decrease of the gauge.)
fn sub(&self, v: f64)[src]
sub subtracts the given value from the gauge. (The value can be
negative, resulting in an increase of the gauge.)
fn get(&self) -> f64[src]
get returns the gauge value.
Trait Implementations
impl Clone for Gauge[src]
fn clone(&self) -> Gauge[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