pub struct AllocationStatsSnapshot {
pub allocated_bytes: usize,
pub allocated_objects: usize,
pub deallocated_bytes: usize,
pub deallocated_objects: usize,
}
Expand description
Snapshot of allocation statistics for a group.
Fields§
§allocated_bytes: usize
Number of allocated bytes since the last snapshot.
allocated_objects: usize
Number of allocated objects since the last snapshot.
deallocated_bytes: usize
Number of deallocated bytes since the last snapshot.
deallocated_objects: usize
Number of deallocated objects since the last snapshot.
Implementations§
Source§impl AllocationStatsSnapshot
impl AllocationStatsSnapshot
Sourcepub fn live_bytes(&self) -> usize
pub fn live_bytes(&self) -> usize
Returns the number of live allocated bytes.
Sourcepub fn live_objects(&self) -> usize
pub fn live_objects(&self) -> usize
Returns the number of live allocated objects.
Auto Trait Implementations§
impl Freeze for AllocationStatsSnapshot
impl RefUnwindSafe for AllocationStatsSnapshot
impl Send for AllocationStatsSnapshot
impl Sync for AllocationStatsSnapshot
impl Unpin for AllocationStatsSnapshot
impl UnwindSafe for AllocationStatsSnapshot
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self> ⓘ
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more