pub struct AllocationSnapshotV2 {
pub allocations: u64,
pub deallocations: u64,
pub allocated_bytes: u64,
pub deallocated_bytes: u64,
pub live_bytes: u64,
pub peak_live_bytes: u64,
pub slots: [AllocationSlotV2; 35],
}Expand description
Process-wide allocation counters at one instant, split by owning stage.
Fields§
§allocations: u64§deallocations: u64§allocated_bytes: u64§deallocated_bytes: u64§live_bytes: u64§peak_live_bytes: u64§slots: [AllocationSlotV2; 35]One slot per crate::Stage in wire order plus the root slot.
Implementations§
Source§impl AllocationSnapshotV2
impl AllocationSnapshotV2
Sourcepub fn slot(&self, stage: Stage) -> &AllocationSlotV2
pub fn slot(&self, stage: Stage) -> &AllocationSlotV2
Counters owned by one stage, or the root slot for unattributed work.
Sourcepub fn root(&self) -> &AllocationSlotV2
pub fn root(&self) -> &AllocationSlotV2
Counters for allocations made outside any recorded span.
Sourcepub fn live_delta_since(&self, start: &Self) -> u64
pub fn live_delta_since(&self, start: &Self) -> u64
Live bytes delta between two snapshots.
Trait Implementations§
Source§impl Clone for AllocationSnapshotV2
impl Clone for AllocationSnapshotV2
Source§fn clone(&self) -> AllocationSnapshotV2
fn clone(&self) -> AllocationSnapshotV2
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 moreSource§impl Debug for AllocationSnapshotV2
impl Debug for AllocationSnapshotV2
impl Eq for AllocationSnapshotV2
Source§impl PartialEq for AllocationSnapshotV2
impl PartialEq for AllocationSnapshotV2
impl StructuralPartialEq for AllocationSnapshotV2
Auto Trait Implementations§
impl Freeze for AllocationSnapshotV2
impl RefUnwindSafe for AllocationSnapshotV2
impl Send for AllocationSnapshotV2
impl Sync for AllocationSnapshotV2
impl Unpin for AllocationSnapshotV2
impl UnsafeUnpin for AllocationSnapshotV2
impl UnwindSafe for AllocationSnapshotV2
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