Struct coca::arena::UtilizationProfile
source · [−]pub struct UtilizationProfile {
pub peak_utilization: usize,
pub allocation_count: usize,
pub failed_allocations: usize,
}
profile
only.Expand description
A summary of all allocations from an arena and all its sub-arenas from it since its creation.
Note that every call to ArenaWrite::write_str
individually counts towards
allocation_count
and, if unsuccessful, failed_allocations
, so strings
created with fmt!
are counted as multiple allocations.
Fields
peak_utilization: usize
The maximum number of occupied bytes at any point in time, including padding.
allocation_count: usize
The total number of allocations attempted, including failed allocations.
failed_allocations: usize
The total number of attempted allocations for which the remaining space was insufficient.
Trait Implementations
sourceimpl Clone for UtilizationProfile
impl Clone for UtilizationProfile
sourcefn clone(&self) -> UtilizationProfile
fn clone(&self) -> UtilizationProfile
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UtilizationProfile
impl Debug for UtilizationProfile
impl Copy for UtilizationProfile
Auto Trait Implementations
impl RefUnwindSafe for UtilizationProfile
impl Send for UtilizationProfile
impl Sync for UtilizationProfile
impl Unpin for UtilizationProfile
impl UnwindSafe for UtilizationProfile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more