Skip to main content

Allocated

Struct Allocated 

Source
pub struct Allocated {
    pub min: Heap,
    pub max: Heap,
    pub runs: u32,
}
Expand description

Heap allocations from repeated DHAT runs: each metric’s floor and ceiling, taken independently, as Counted does for instructions.

Fields§

§min: Heap§max: Heap§runs: u32

Implementations§

Source§

impl Allocated

Source

pub fn totals_spread_pct(&self) -> f64

The wider spread of the two totals, blocks and bytes.

Source

pub fn peak_spread_pct(&self) -> f64

The spread of the peak.

Source

pub fn is_suspect(&self) -> bool

Whether the totals moved between runs, which says the program’s work did. Same threshold as instructions. The totals of every hermetic subject measured, threaded ones included, repeated exactly; the one that moved was git status refreshing its index on the first run.

Source

pub fn peak_is_unsteady(&self) -> bool

Whether the peak moved while the totals did not. That is how a threaded subject looks: every thread does the same work, but how much of it is live at once depends on how valgrind interleaves them, which moved an 8-thread subject’s peak by up to 2.5%.

Source

pub fn saw_nothing(&self) -> bool

Whether DHAT saw no heap allocation at all. Nearly always blindness rather than a finding: DHAT counts only calls it can intercept, so a statically linked binary, or one with its own allocator compiled in (jemalloc, mimalloc), reports zero however much it allocates.

Trait Implementations§

Source§

impl Clone for Allocated

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Allocated

Source§

impl Debug for Allocated

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.