pub struct MemoryProfiler { /* private fields */ }Expand description
Memory profiler for tracking FFT memory usage
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
Sourcepub fn record_allocation(&mut self, bytes: usize)
pub fn record_allocation(&mut self, bytes: usize)
Record an allocation
Sourcepub fn record_deallocation(&mut self, bytes: usize)
pub fn record_deallocation(&mut self, bytes: usize)
Record a deallocation
Sourcepub fn peak_memory(&self) -> usize
pub fn peak_memory(&self) -> usize
Get peak memory usage
Sourcepub fn current_allocation(&self) -> usize
pub fn current_allocation(&self) -> usize
Get current allocation
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable/disable tracking
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryProfiler
impl RefUnwindSafe for MemoryProfiler
impl Send for MemoryProfiler
impl Sync for MemoryProfiler
impl Unpin for MemoryProfiler
impl UnsafeUnpin 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> 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