Struct glean_core::metrics::LocalCustomDistribution
source · pub struct LocalCustomDistribution<'a> { /* private fields */ }
Expand description
Experimental: A histogram buffer associated with a specific instance of a CustomDistributionMetric
.
Accumulation happens in-memory.
Data is merged into the metric on Drop::drop
.
Implementations§
source§impl<'a> LocalCustomDistribution<'a>
impl<'a> LocalCustomDistribution<'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§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for LocalCustomDistribution<'a>
impl<'a> Send for LocalCustomDistribution<'a>
impl<'a> Sync for LocalCustomDistribution<'a>
impl<'a> Unpin for LocalCustomDistribution<'a>
impl<'a> UnwindSafe for LocalCustomDistribution<'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