pub struct AllocatorUsage { /* private fields */ }Expand description
A snapshot of custom allocation across the process.
Decline counters include all generations since the service was created,
including retired policies. They saturate at u64::MAX and never reset.
Each declined SDK request increments exactly one reason; successful
allocations increment none.
Implementations§
Source§impl AllocatorUsage
impl AllocatorUsage
Sourcepub fn declined_allocations(self) -> u64
pub fn declined_allocations(self) -> u64
All declined custom receive allocations across the process.
The total saturates at u64::MAX.
Sourcepub fn declined(self, reason: AllocationDecline) -> u64
pub fn declined(self, reason: AllocationDecline) -> u64
Declined custom receive allocations for one reason.
Sourcepub fn generations(self) -> usize
pub fn generations(self) -> usize
Policies that exist, including replaced ones whose allocations the SDK still holds. A policy whose destructor panicked stays counted.
Sourcepub fn active_generations(self) -> usize
pub fn active_generations(self) -> usize
Policies currently registered with a receiver.
Sourcepub fn retained_allocations(self) -> usize
pub fn retained_allocations(self) -> usize
Allocations the SDK holds, including those being released. A release whose policy code panicked stays counted, because its storage may have leaked.
Sourcepub fn retained_bytes(self) -> usize
pub fn retained_bytes(self) -> usize
Bytes the SDK holds, including those being released. A release whose policy code panicked stays counted, because its storage may have leaked.
Sourcepub fn in_progress_allocations(self) -> usize
pub fn in_progress_allocations(self) -> usize
Policy calls running at this moment.
Sourcepub fn in_progress_reclamations(self) -> usize
pub fn in_progress_reclamations(self) -> usize
Buffers whose release is running at this moment. A release whose policy code panicked stays counted, because its storage may have leaked. This count therefore does not return to zero after such a panic.