pub struct MemoryProfiler { /* private fields */ }Expand description
Memory profiler for tracking allocations.
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
Sourcepub fn with_sample_interval(self, interval: Duration) -> Self
pub fn with_sample_interval(self, interval: Duration) -> Self
Set the sampling interval.
Sourcepub fn start(&self) -> MemoryProfilerGuard<'_>
pub fn start(&self) -> MemoryProfilerGuard<'_>
Start profiling with background sampling.
Sourcepub fn snapshot(&self) -> MemorySnapshot
pub fn snapshot(&self) -> MemorySnapshot
Take a memory snapshot.
Sourcepub fn report(&self) -> MemoryReport
pub fn report(&self) -> MemoryReport
Generate a memory report.
Sourcepub fn tracker(&self) -> &Arc<AllocationTracker>
pub fn tracker(&self) -> &Arc<AllocationTracker>
Get the allocation tracker for custom 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