pub struct MemoryDiff {
pub virtual_memory_delta: i64,
pub resident_memory_delta: i64,
pub duration: Duration,
}Expand description
Memory usage difference between snapshots
Fields§
§virtual_memory_delta: i64Change in virtual memory (bytes)
resident_memory_delta: i64Change in resident memory (bytes)
duration: DurationDuration between snapshots
Implementations§
Source§impl MemoryDiff
impl MemoryDiff
Sourcepub fn is_potential_leak(&self, threshold_bytes: u64) -> bool
pub fn is_potential_leak(&self, threshold_bytes: u64) -> bool
Check if this represents a potential memory leak
Sourcepub fn memory_growth_rate(&self) -> f64
pub fn memory_growth_rate(&self) -> f64
Get memory growth rate in bytes per second
Trait Implementations§
Source§impl Clone for MemoryDiff
impl Clone for MemoryDiff
Source§fn clone(&self) -> MemoryDiff
fn clone(&self) -> MemoryDiff
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MemoryDiff
impl RefUnwindSafe for MemoryDiff
impl Send for MemoryDiff
impl Sync for MemoryDiff
impl Unpin for MemoryDiff
impl UnsafeUnpin for MemoryDiff
impl UnwindSafe for MemoryDiff
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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