Module run_metrics

Module run_metrics 

Source
Expand description

2026-09-26: The run mailbox: process-global counters read by the /metrics handler and the TUI, which hold no handle to the scheduler’s context, and reset_for_new_run, which starts a new run’s accounting.

MetraleCudaBackend::new calls reset_for_new_run before its first kernel lookup, so the kernel audit lists only that backend’s lookups.

Owner: telemetry. Invariants: the prefix-cache counters never decrease; a run’s own counts are the difference from the snapshot reset_for_new_run takes.

Structs§

RunMetrics
2026-09-26: The process’s run mailbox.

Functions§

cache_counts_this_run
2026-09-26: Prefix-cache (hits, misses, hit tokens) since the last reset_for_new_run. The TUI shows these; /metrics exports the cumulative counters.
metrics
2026-09-26: Read the mailbox.
reset_for_new_run
2026-09-26: Begin a new run’s accounting: snapshot the prefix-cache counters as this run’s baseline, zero the entropy counters, the last entropy and the free-memory baseline, clear the kernel audit (unless its lock is poisoned) and unseal it.