Skip to main content

Module metrics

Module metrics 

Source
Expand description

Metered timer wheel: thin wrapper around the base TimerWheel that tracks per-instance counters. Counters are plain u64 fields - no atomics, no locks - because the underlying wheel is itself single-threaded. Pair with the concurrent feature for a thread-safe metered surface (wrap a MeteredTimerWheel inside a mutex of your own).

cascade_events is always 0 for the single-level base wheel. It’s tracked here so downstream code that swaps the wheel for the hierarchical variant doesn’t need a schema change in the metrics snapshot. The hierarchical wheel exposes its own cascades() counter directly; see that module.

Structs§

MeteredTimerWheel
TimerMetrics