pub struct MemorySnapshot {
pub timestamp: Option<Instant>,
pub heap_bytes: usize,
pub allocation_count: usize,
}Expand description
Memory usage snapshot.
Fields§
§timestamp: Option<Instant>Timestamp of snapshot
heap_bytes: usizeEstimated heap usage in bytes
allocation_count: usizeNumber of active allocations
Implementations§
Source§impl MemorySnapshot
impl MemorySnapshot
Sourcepub fn record_allocation(&mut self, size: usize)
pub fn record_allocation(&mut self, size: usize)
Record an allocation.
Sourcepub fn record_deallocation(&mut self, size: usize)
pub fn record_deallocation(&mut self, size: usize)
Record a deallocation.
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 moreSource§impl Debug for MemorySnapshot
impl Debug for MemorySnapshot
Source§impl Default for MemorySnapshot
impl Default for MemorySnapshot
Source§fn default() -> MemorySnapshot
fn default() -> MemorySnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemorySnapshot
impl RefUnwindSafe for MemorySnapshot
impl Send for MemorySnapshot
impl Sync for MemorySnapshot
impl Unpin 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