pub struct SnapshotDiff {
pub time_delta: Duration,
pub allocations_delta: i64,
pub deallocations_delta: i64,
pub bytes_delta: i64,
pub peak_delta: i64,
pub string_pool_delta: i64,
pub buffer_pool_delta: i64,
pub from_label: String,
pub to_label: String,
}Expand description
Difference between two memory snapshots.
Fields§
§time_delta: DurationTime between snapshots.
allocations_delta: i64Change in allocation count.
deallocations_delta: i64Change in deallocation count.
bytes_delta: i64Change in current bytes.
peak_delta: i64Change in peak bytes.
string_pool_delta: i64Change in string pool size.
buffer_pool_delta: i64Change in buffer pool available.
from_label: StringLabel of “from” snapshot.
to_label: StringLabel of “to” snapshot.
Implementations§
Source§impl SnapshotDiff
impl SnapshotDiff
Sourcepub fn significant_growth(&self, from_bytes: usize) -> bool
pub fn significant_growth(&self, from_bytes: usize) -> bool
Check if memory grew significantly (>10%).
Sourcepub fn net_allocations(&self) -> i64
pub fn net_allocations(&self) -> i64
Get net allocation change.
Trait Implementations§
Source§impl Clone for SnapshotDiff
impl Clone for SnapshotDiff
Source§fn clone(&self) -> SnapshotDiff
fn clone(&self) -> SnapshotDiff
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotDiff
impl Debug for SnapshotDiff
Auto Trait Implementations§
impl Freeze for SnapshotDiff
impl RefUnwindSafe for SnapshotDiff
impl Send for SnapshotDiff
impl Sync for SnapshotDiff
impl Unpin for SnapshotDiff
impl UnwindSafe for SnapshotDiff
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