pub struct MemoryProfiler;Expand description
Memory profiling utilities
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
Sourcepub fn profile<F, R>(name: &str, f: F) -> Rwhere
F: FnOnce() -> R,
pub fn profile<F, R>(name: &str, f: F) -> Rwhere
F: FnOnce() -> R,
Profile a function’s memory usage
Sourcepub async fn profile_async<F, Fut, R>(name: &str, f: F) -> R
pub async fn profile_async<F, Fut, R>(name: &str, f: F) -> R
Profile an async function’s memory usage
Sourcepub fn snapshot() -> MemorySnapshot
pub fn snapshot() -> MemorySnapshot
Get current memory snapshot
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