pub struct Stats {
pub opcodes: u64,
pub steps: u64,
pub threads_created: u64,
pub threads_completed: u64,
pub frames_pushed: u64,
pub frames_popped: u64,
pub choices_presented: u64,
pub choices_selected: u64,
pub snapshot_cache_hits: u64,
pub snapshot_cache_misses: u64,
pub materializations: u64,
}Expand description
Lightweight counters tracking VM activity over a story’s lifetime.
Always-on — incrementing a u64 is effectively free compared to opcode
dispatch. Use Story::stats to read after a run.
Fields§
§opcodes: u64Total opcodes dispatched.
steps: u64Total vm::step calls from the outer loop.
threads_created: u64Threads forked (via ThreadCall and choice creation).
threads_completed: u64Threads that completed and were popped.
frames_pushed: u64Call frames pushed onto thread stacks.
frames_popped: u64Call frames popped from thread stacks.
choices_presented: u64Choice sets presented to the player.
choices_selected: u64Individual choices selected.
snapshot_cache_hits: u64CallStack::snapshot cache hits (reused existing Arc).
snapshot_cache_misses: u64CallStack::snapshot cache misses (new allocation).
materializations: u64CallStack::materialize calls (flattened inherited prefix).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
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