pub struct AggregatedHistogram { /* private fields */ }Expand description
An aggregated histogram with fixed buckets, suitable for Prometheus exposition.
Bucket layout follows a log-linear schedule. A metric name ending in _seconds selects the
time-oriented bucket schedule; everything else uses the non-time schedule.
Implementations§
Source§impl AggregatedHistogram
impl AggregatedHistogram
Sourcepub fn new(metric_name: &str) -> Self
pub fn new(metric_name: &str) -> Self
Creates a new AggregatedHistogram for the given metric name.
The metric name determines the bucket schedule: names ending in _seconds use a
time-oriented schedule, everything else uses a generic non-time schedule.
Sourcepub fn merge(&mut self, other: &AggregatedHistogram)
pub fn merge(&mut self, other: &AggregatedHistogram)
Merges another aggregated histogram into this one.
The two histograms must have been constructed with the same bucket schedule (in practice, this means they were constructed for the same metric name).
Sourcepub fn merge_histogram(&mut self, histogram: &Histogram)
pub fn merge_histogram(&mut self, histogram: &Histogram)
Folds the samples from histogram into this aggregated histogram.
Trait Implementations§
Source§impl Clone for AggregatedHistogram
impl Clone for AggregatedHistogram
Source§fn clone(&self) -> AggregatedHistogram
fn clone(&self) -> AggregatedHistogram
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 AggregatedHistogram
impl RefUnwindSafe for AggregatedHistogram
impl Send for AggregatedHistogram
impl Sync for AggregatedHistogram
impl Unpin for AggregatedHistogram
impl UnsafeUnpin for AggregatedHistogram
impl UnwindSafe for AggregatedHistogram
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