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, one ending in _bytes selects the size-oriented schedule, and everything else uses
the generic 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, names ending in _bytes use a size-oriented schedule, and 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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>
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>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more