pub(super) struct Histogram<B: HistogramBucketLabel> {
buckets: Box<[Counter]>,
count: Counter,
sum_micros: Counter,
_bucket: PhantomData<B>,
}Fields§
§buckets: Box<[Counter]>§count: Counter§sum_micros: Counter§_bucket: PhantomData<B>Implementations§
Source§impl<B: HistogramBucketLabel> Histogram<B>
impl<B: HistogramBucketLabel> Histogram<B>
Sourcepub(super) fn observe(&self, duration: Duration)
pub(super) fn observe(&self, duration: Duration)
records one cumulative Prometheus histogram observation
every bucket at or above the selected bound is incremented so snapshots can
be rendered directly as _bucket{le=...} samples
pub(super) fn load_bucket(&self, bucket: B) -> u64
pub(super) fn load_count(&self) -> u64
pub(super) fn load_sum_micros(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl<B> !Freeze for Histogram<B>
impl<B> RefUnwindSafe for Histogram<B>where
B: RefUnwindSafe,
impl<B> Send for Histogram<B>where
B: Send,
impl<B> Sync for Histogram<B>where
B: Sync,
impl<B> Unpin for Histogram<B>where
B: Unpin,
impl<B> UnsafeUnpin for Histogram<B>
impl<B> UnwindSafe for Histogram<B>where
B: UnwindSafe,
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