pub struct ProfStats {
pub enabled: bool,
pub accum: bool,
pub sample_rate: usize,
pub live_samples: usize,
pub live_bytes: usize,
pub accum_samples: usize,
pub accum_bytes: usize,
pub unique_stacks: usize,
pub arena_committed: usize,
pub stack_table_overflows: usize,
pub dropped_samples: usize,
pub heap: HeapStats,
}Expand description
Snapshot of mi_prof_stats_get’s counters, translated from the raw
sys struct into plain Rust types.
Fields§
§enabled: bool§accum: bool§sample_rate: usize§live_samples: usize§live_bytes: usize§accum_samples: usize§accum_bytes: usize§unique_stacks: usize§arena_committed: usize§stack_table_overflows: usize§dropped_samples: usizeCount of ALL dropped samples (record-alloc failure, stack-intern
failure, including the stack-table cap); a superset of
stack_table_overflows, so dropped_samples >= stack_table_overflows always.
heap: HeapStatsAllocator-level (“ground truth”) counters, read from the mimalloc v3
engine’s per-heap statistics at the time of the call. Every field
above is sampled; these are exact, so comparing them against
live_bytes measures the sampler’s error directly – which is what
makes an assertion on a sampled profile meaningful in a test.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfStats
impl RefUnwindSafe for ProfStats
impl Send for ProfStats
impl Sync for ProfStats
impl Unpin for ProfStats
impl UnsafeUnpin for ProfStats
impl UnwindSafe for ProfStats
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
Mutably borrows from an owned value. Read more