pub struct MemoryProfiler { /* private fields */ }Expand description
Memory profiler for tracking allocations and usage
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
Sourcepub fn start_tracking(self: &Arc<Self>, operation: &str) -> MemoryTrackingGuard
pub fn start_tracking(self: &Arc<Self>, operation: &str) -> MemoryTrackingGuard
Start tracking memory usage for an operation
Returns a guard that will record statistics when dropped.
Sourcepub fn get_stats(&self, operation: &str) -> Option<MemoryStats>
pub fn get_stats(&self, operation: &str) -> Option<MemoryStats>
Get statistics for a specific operation
Sourcepub fn get_all_stats(&self) -> HashMap<String, MemoryStats>
pub fn get_all_stats(&self) -> HashMap<String, MemoryStats>
Get all tracked statistics
Sourcepub fn generate_report(&self) -> MemoryProfilingReport
pub fn generate_report(&self) -> MemoryProfilingReport
Generate a memory profiling report
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 !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