pub struct MemoryProfiler { /* private fields */ }Expand description
Memory profiler for tracking allocations
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
Sourcepub fn deallocate(&self, bytes: usize)
pub fn deallocate(&self, bytes: usize)
Record a deallocation
Sourcepub fn current_bytes(&self) -> usize
pub fn current_bytes(&self) -> usize
Get current memory usage
Sourcepub fn peak_bytes(&self) -> usize
pub fn peak_bytes(&self) -> usize
Get peak memory usage
Sourcepub fn allocations(&self) -> usize
pub fn allocations(&self) -> usize
Get allocation count
Sourcepub fn deallocations(&self) -> usize
pub fn deallocations(&self) -> usize
Get deallocation count
Sourcepub fn net_allocations(&self) -> isize
pub fn net_allocations(&self) -> isize
Get net allocations (allocations - deallocations)
Sourcepub fn stats(&self) -> ProfilerMemoryStats
pub fn stats(&self) -> ProfilerMemoryStats
Get memory statistics
Trait Implementations§
Source§impl Debug for MemoryProfiler
impl Debug for MemoryProfiler
Source§impl Default for MemoryProfiler
impl Default for MemoryProfiler
Source§fn default() -> MemoryProfiler
fn default() -> MemoryProfiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryProfiler
impl RefUnwindSafe for MemoryProfiler
impl Send for MemoryProfiler
impl Sync for MemoryProfiler
impl Unpin for MemoryProfiler
impl UnwindSafe for MemoryProfiler
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