pub struct AllocationStats {
pub allocations_recorded: u64,
pub deallocations_recorded: u64,
pub events_dropped: u64,
pub overhead_per_allocation_ns: f64,
}Expand description
Get allocation tracking statistics
Returns basic statistics about allocation tracking overhead. Used for performance monitoring and optimization.
Fields§
§allocations_recorded: u64Number of allocations recorded
deallocations_recorded: u64Number of deallocations recorded
events_dropped: u64Number of tracking events dropped due to buffer overflow
overhead_per_allocation_ns: f64Estimated tracking overhead in nanoseconds per allocation
Implementations§
Source§impl AllocationStats
impl AllocationStats
Sourcepub fn efficiency_ratio(&self) -> f64
pub fn efficiency_ratio(&self) -> f64
Calculate tracking efficiency ratio
Sourcepub fn is_performance_acceptable(&self) -> bool
pub fn is_performance_acceptable(&self) -> bool
Check if tracking performance is acceptable
Trait Implementations§
Source§impl Clone for AllocationStats
impl Clone for AllocationStats
Source§fn clone(&self) -> AllocationStats
fn clone(&self) -> AllocationStats
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 AllocationStats
impl RefUnwindSafe for AllocationStats
impl Send for AllocationStats
impl Sync for AllocationStats
impl Unpin for AllocationStats
impl UnwindSafe for AllocationStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more