Struct hornet::client::metric::GaugeVector
[−]
[src]
pub struct GaugeVector { /* fields omitted */ }
A gauge vector for multiple floating point values with helper methods for incrementing and decrementing their value
Internally uses an InstanceMetric<f64>
with Semantics::Instant
and
Count::One
scale, and 1
count dimension
Methods
impl GaugeVector
[src]
fn new(
name: &str,
init_val: f64,
instances: &[&str],
shorthelp_text: &str,
longhelp_text: &str
) -> Result<Self, String>
[src]
name: &str,
init_val: f64,
instances: &[&str],
shorthelp_text: &str,
longhelp_text: &str
) -> Result<Self, String>
Creates a new gauge vector with given initial value and instances
fn val(&self, instance: &str) -> Option<f64>
[src]
Returns the current gauge of the instance
fn set(&mut self, instance: &str, val: f64) -> Option<Result<()>>
[src]
Sets the gauge of the instance
fn inc(&mut self, instance: &str, increment: f64) -> Option<Result<()>>
[src]
Increments the gauge of the instance by the given value
The wrapping Option
is None
if the instance wasn't found
fn dec(&mut self, instance: &str, decrement: f64) -> Option<Result<()>>
[src]
Decrements the gauge of the instance by the given value
The wrapping Option
is None
if the instance wasn't found
fn inc_all(&mut self, increment: f64) -> Result<()>
[src]
Increments the gauge of all instances by the given value
fn dec_all(&mut self, decrement: f64) -> Result<()>
[src]
Decrements the gauge of all instances by the given value
fn reset(&mut self, instance: &str) -> Option<Result<()>>
[src]
Resets the gauge of the instance to the initial value that was passed when creating the vector
The wrapping Option
is None
if the instance wasn't found
fn reset_all(&mut self) -> Result<()>
[src]
Resets the gauge of all instances to the initial value that was passed when creating the vector
fn indom(&self) -> &Indom
[src]
Internally created instance domain