Skip to main content

should_sample_slow

Function should_sample_slow 

Source
pub fn should_sample_slow(elapsed_since_last_sample: Duration) -> bool
Expand description

True once at least SLOW_SAMPLE_INTERVAL has elapsed since the last slow sample. Extracted as a pure function (mirroring saturation_monitor.rs’s sample_once extraction) so the gating decision itself is directly testable with plain Duration values, rather than only reachable from inside the infinite loop below.