Struct glean_core::metrics::LocalMemoryDistribution
source · pub struct LocalMemoryDistribution<'a> { /* private fields */ }
Expand description
Experimental: A histogram buffer associated with a specific instance of a MemoryDistributionMetric
.
Accumulation happens in-memory.
Data is merged into the metric on Drop::drop
.
Implementations§
source§impl<'a> LocalMemoryDistribution<'a>
impl<'a> LocalMemoryDistribution<'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::MemoryUnit::Kilobyte
, then
sample
is assumed to be in kilobytes).
Accumulation happens in-memory only.
Trait Implementations§
source§impl<'a> Debug for LocalMemoryDistribution<'a>
impl<'a> Debug for LocalMemoryDistribution<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for LocalMemoryDistribution<'a>
impl<'a> Send for LocalMemoryDistribution<'a>
impl<'a> Sync for LocalMemoryDistribution<'a>
impl<'a> Unpin for LocalMemoryDistribution<'a>
impl<'a> UnwindSafe for LocalMemoryDistribution<'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