pub struct ArenaStats {
pub total_allocations: u64,
pub total_bytes_allocated: u64,
pub current_bytes_allocated: usize,
pub peak_bytes_allocated: usize,
pub reset_count: u64,
pub checkpoint_count: u64,
pub rollback_count: u64,
pub average_allocation_size: f64,
pub allocation_rate: f64,
pub utilization_ratio: f64,
pub first_allocation_time: Option<Instant>,
pub last_allocation_time: Option<Instant>,
}Expand description
Arena allocator statistics
Fields§
§total_allocations: u64Total number of allocations
total_bytes_allocated: u64Total bytes allocated
current_bytes_allocated: usizeCurrent bytes allocated
peak_bytes_allocated: usizePeak bytes allocated
reset_count: u64Number of resets
checkpoint_count: u64Number of checkpoint operations
rollback_count: u64Number of rollback operations
average_allocation_size: f64Average allocation size
allocation_rate: f64Allocation rate (allocations per second)
utilization_ratio: f64Memory utilization ratio
first_allocation_time: Option<Instant>Time of first allocation
last_allocation_time: Option<Instant>Time of last allocation
Implementations§
Source§impl ArenaStats
impl ArenaStats
pub fn record_allocation(&mut self, size: usize)
pub fn record_reset(&mut self)
pub fn record_checkpoint(&mut self)
pub fn record_rollback(&mut self, bytes_freed: usize)
pub fn update_utilization(&mut self, total_size: usize)
Trait Implementations§
Source§impl Clone for ArenaStats
impl Clone for ArenaStats
Source§fn clone(&self) -> ArenaStats
fn clone(&self) -> ArenaStats
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 ArenaStats
impl Debug for ArenaStats
Source§impl Default for ArenaStats
impl Default for ArenaStats
Source§fn default() -> ArenaStats
fn default() -> ArenaStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ArenaStats
impl RefUnwindSafe for ArenaStats
impl Send for ArenaStats
impl Sync for ArenaStats
impl Unpin for ArenaStats
impl UnsafeUnpin for ArenaStats
impl UnwindSafe for ArenaStats
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> 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