pub struct FrameStats { /* private fields */ }Expand description
The deterministic per-run tally: counts plus the schedule digest.
Everything here is a function of the plans absorbed, so two runs of the same schedule produce identical statistics on any machine.
Implementations§
Source§impl FrameStats
impl FrameStats
pub const fn new() -> Self
Sourcepub fn absorb(&mut self, plan: &FramePlan)
pub fn absorb(&mut self, plan: &FramePlan)
Tally one frame and fold its plan into the schedule digest.
Every counter saturates. That is not ceremony for the frame count: a single frame on a saturated bank drops on the order of 1.1e12 steps, so the dropped tally is only about ten million such frames from the ceiling, and an arithmetic overflow is a panic this crate does not get to have.
pub const fn frames(&self) -> u64
pub const fn ticks(&self) -> u64
pub const fn steps_dropped(&self) -> u64
Sourcepub const fn schedule_hash(&self) -> u64
pub const fn schedule_hash(&self) -> u64
The fingerprint of every plan absorbed, in order.
pub const fn json(&self) -> FrameStatsJson<'_>
Trait Implementations§
Source§impl Clone for FrameStats
impl Clone for FrameStats
Source§fn clone(&self) -> FrameStats
fn clone(&self) -> FrameStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FrameStats
Source§impl Debug for FrameStats
impl Debug for FrameStats
Source§impl Default for FrameStats
impl Default for FrameStats
impl Eq for FrameStats
Source§impl PartialEq for FrameStats
impl PartialEq for FrameStats
impl StructuralPartialEq for FrameStats
Auto Trait Implementations§
impl Freeze for FrameStats
impl RefUnwindSafe for FrameStats
impl Send for FrameStats
impl Sync for FrameStats
impl Unpin for FrameStats
impl UnsafeUnpin for FrameStats
impl UnwindSafe for FrameStats
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