pub struct MemoryMetrics { /* private fields */ }Expand description
Memory allocation metrics
Implementations§
Source§impl MemoryMetrics
impl MemoryMetrics
Sourcepub fn record_alloc(&self, bytes: usize)
pub fn record_alloc(&self, bytes: usize)
Record an allocation
Sourcepub fn record_dealloc(&self, bytes: usize)
pub fn record_dealloc(&self, bytes: usize)
Record a deallocation
Sourcepub fn record_context_alloc(&self)
pub fn record_context_alloc(&self)
Record a context allocation
Sourcepub fn record_graph_alloc(&self)
pub fn record_graph_alloc(&self)
Record a graph allocation
Sourcepub fn total_allocations(&self) -> u64
pub fn total_allocations(&self) -> u64
Get total allocations
Sourcepub fn total_deallocations(&self) -> u64
pub fn total_deallocations(&self) -> u64
Get total deallocations
Sourcepub fn total_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Get total bytes allocated
Sourcepub fn peak_bytes(&self) -> usize
pub fn peak_bytes(&self) -> usize
Get peak memory usage
Sourcepub fn current_bytes(&self) -> usize
pub fn current_bytes(&self) -> usize
Get current memory usage
Sourcepub fn context_allocations(&self) -> u64
pub fn context_allocations(&self) -> u64
Get context allocations
Sourcepub fn graph_allocations(&self) -> u64
pub fn graph_allocations(&self) -> u64
Get graph allocations
Sourcepub fn active_allocations(&self) -> u64
pub fn active_allocations(&self) -> u64
Get active allocations
Trait Implementations§
Source§impl Debug for MemoryMetrics
impl Debug for MemoryMetrics
Source§impl Default for MemoryMetrics
impl Default for MemoryMetrics
Source§fn default() -> MemoryMetrics
fn default() -> MemoryMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryMetrics
impl RefUnwindSafe for MemoryMetrics
impl Send for MemoryMetrics
impl Sync for MemoryMetrics
impl Unpin for MemoryMetrics
impl UnwindSafe for MemoryMetrics
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more