Struct glean_core::metrics::LocalTimingDistribution
source · pub struct LocalTimingDistribution<'a> { /* private fields */ }
Expand description
Experimental: A histogram buffer associated with a specific instance of a TimingDistributionMetric
.
Accumulation happens in-memory.
Data is merged into the metric on Drop::drop
.
Implementations§
source§impl<'a> LocalTimingDistribution<'a>
impl<'a> LocalTimingDistribution<'a>
sourcepub fn accumulate(&mut self, sample: u64)
pub fn accumulate(&mut self, sample: u64)
Accumulates one sample into the histogram.
The provided sample must be in the “unit” declared by the instance of the metric type
(e.g. if the instance this method was called on is using crate::TimeUnit::Second
, then
sample
is assumed to be in seconds).
Accumulation happens in-memory only.
Trait Implementations§
source§impl<'a> Debug for LocalTimingDistribution<'a>
impl<'a> Debug for LocalTimingDistribution<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for LocalTimingDistribution<'a>
impl<'a> Send for LocalTimingDistribution<'a>
impl<'a> Sync for LocalTimingDistribution<'a>
impl<'a> Unpin for LocalTimingDistribution<'a>
impl<'a> UnwindSafe for LocalTimingDistribution<'a>
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more