pub struct HeapStats {
pub allocated_objects: u64,
pub allocated_bytes: u64,
pub collections: u64,
pub freed_objects: u64,
pub live_bytes: u64,
pub live_objects: u64,
pub peak_bytes: u64,
pub pause: Duration,
}Expand description
What a run’s heaps did in total.
cove run --stats prints this, and the trace’s heap_summary event
carries it.
Fields§
§allocated_objects: u64Collectable objects allocated over the whole run.
allocated_bytes: u64Bytes those allocations asked for, at the size each object was born.
collections: u64How many collections ran.
freed_objects: u64Objects those collections reclaimed.
live_bytes: u64Bytes live at the most recent collection.
live_objects: u64Objects live at the most recent collection.
peak_bytes: u64The largest live set any collection measured.
pause: DurationTotal time the program was stopped for collection.
Implementations§
Source§impl HeapStats
impl HeapStats
Sourcepub fn merge(&mut self, other: &HeapStats)
pub fn merge(&mut self, other: &HeapStats)
Folds one heap’s totals into these, which is what happens when a task’s thread ends and its heap is retired into the run’s.
The live figures are not merged: a live set is a present fact about one
heap rather than a total over a run. At the end of a run every task’s
heap has been swept and gone with its thread, so what is live is the
entry’s own and crate::interp::Interpreter::heap_stats reads it
from there.
Trait Implementations§
impl Copy for HeapStats
impl Eq for HeapStats
impl StructuralPartialEq for HeapStats
Auto Trait Implementations§
impl Freeze for HeapStats
impl RefUnwindSafe for HeapStats
impl Send for HeapStats
impl Sync for HeapStats
impl Unpin for HeapStats
impl UnsafeUnpin for HeapStats
impl UnwindSafe for HeapStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.