[go: up one dir, main page]

Struct dhat::HeapStats[][src]

#[non_exhaustive]
pub struct HeapStats { pub total_blocks: u64, pub total_bytes: u64, pub curr_blocks: usize, pub curr_bytes: usize, pub max_blocks: usize, pub max_bytes: usize, }
Expand description

Stats from heap profiling.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
total_blocks: u64

Number of blocks (a.k.a. allocations) allocated over the entire run.

total_bytes: u64

Number of bytes allocated over the entire run.

curr_blocks: usize

Number of blocks (a.k.a. allocations) currently allocated.

curr_bytes: usize

Number of bytes currently allocated.

max_blocks: usize

Number of blocks (a.k.a. allocations) allocated at the global peak, i.e. when curr_bytes peaked.

max_bytes: usize

Number of bytes allocated at the global peak, i.e. when curr_bytes peaked.

Implementations

Gets the current heap stats.

Panics

Panics if called when a Profiler is not running or not doing heap profiling.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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.