pub trait Gauge: Send + Sync {
// Required method
fn value(&self, config: &MetricConfig, now: i64) -> MetricValue;
}Expand description
A gauge metric is an instantaneous reading of a particular value.
In Java Gauge<T> extends MetricValueProvider<T> and is a functional
interface producing a value of type T. Because the public metric value is
type-erased, the Rust gauge produces a MetricValue.
Required Methods§
Sourcefn value(&self, config: &MetricConfig, now: i64) -> MetricValue
fn value(&self, config: &MetricConfig, now: i64) -> MetricValue
Returns the current value associated with this gauge.
config- The configuration for this metricnow- The POSIX time in milliseconds the measurement is being taken