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: u32Implementations§
Source§impl Allocated
impl Allocated
Sourcepub fn totals_spread_pct(&self) -> f64
pub fn totals_spread_pct(&self) -> f64
The wider spread of the two totals, blocks and bytes.
Sourcepub fn peak_spread_pct(&self) -> f64
pub fn peak_spread_pct(&self) -> f64
The spread of the peak.
Sourcepub fn is_suspect(&self) -> bool
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.
Sourcepub fn peak_is_unsteady(&self) -> bool
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%.
Sourcepub fn saw_nothing(&self) -> bool
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.