pub struct MemorySnapshot {
pub timestamp: Instant,
pub allocated_bytes: u64,
pub allocation_count: u64,
pub freed_bytes: u64,
pub deallocation_count: u64,
pub live_bytes: u64,
pub live_count: u64,
pub peak_bytes: u64,
pub rss_bytes: Option<u64>,
pub heap_bytes: Option<u64>,
}Expand description
Memory snapshot at a point in time.
Fields§
§timestamp: InstantTimestamp when snapshot was taken.
allocated_bytes: u64Total allocated bytes.
allocation_count: u64Total number of allocations.
freed_bytes: u64Total freed bytes.
deallocation_count: u64Number of deallocations.
live_bytes: u64Current live allocations (allocated - freed).
live_count: u64Current live allocation count.
peak_bytes: u64Peak memory usage.
rss_bytes: Option<u64>Resident set size (from OS).
heap_bytes: Option<u64>Heap usage (from allocator if available).
Implementations§
Trait Implementations§
Source§impl Clone for MemorySnapshot
impl Clone for MemorySnapshot
Source§fn clone(&self) -> MemorySnapshot
fn clone(&self) -> MemorySnapshot
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 moreAuto Trait Implementations§
impl Freeze for MemorySnapshot
impl RefUnwindSafe for MemorySnapshot
impl Send for MemorySnapshot
impl Sync for MemorySnapshot
impl Unpin for MemorySnapshot
impl UnsafeUnpin for MemorySnapshot
impl UnwindSafe for MemorySnapshot
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