pub enum AggregatedMetricValue {
Counter(f64),
Gauge(f64),
Histogram(AggregatedHistogram),
}Expand description
Aggregated metric value.
Variants§
Counter(f64)
A counter.
Gauge(f64)
A gauge.
Histogram(AggregatedHistogram)
A histogram with fixed buckets.
Implementations§
Source§impl AggregatedMetricValue
impl AggregatedMetricValue
Sourcepub fn value(&self) -> f64
pub fn value(&self) -> f64
Returns the scalar value of the metric, if this is a counter or gauge.
Returns 0.0 for histograms.
Sourcepub fn merge(&mut self, incoming: &AggregatedMetricValue)
pub fn merge(&mut self, incoming: &AggregatedMetricValue)
Merges two aggregated metric values.
Counters are summed, gauges use last-write-wins (the incoming value is kept), histograms are merged per-bucket and by sum/count.
Trait Implementations§
Source§impl Clone for AggregatedMetricValue
impl Clone for AggregatedMetricValue
Source§fn clone(&self) -> AggregatedMetricValue
fn clone(&self) -> AggregatedMetricValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AggregatedMetricValue
impl RefUnwindSafe for AggregatedMetricValue
impl Send for AggregatedMetricValue
impl Sync for AggregatedMetricValue
impl Unpin for AggregatedMetricValue
impl UnsafeUnpin for AggregatedMetricValue
impl UnwindSafe for AggregatedMetricValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Instruments this type by attaching the current resource group, returning a
Tracked wrapper. Read more