pub struct UtilizationProfile {
    pub peak_utilization: usize,
    pub allocation_count: usize,
    pub failed_allocations: usize,
}
This is supported on crate feature 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.