Skip to main content

should_warn_churn

Function should_warn_churn 

Source
pub fn should_warn_churn(compiled_ids: usize, prior_warn_count: u32) -> bool
Expand description

Whether ShaderEffects::ensure_pipeline should log its churn-detection warning: compiled_ids (the live compiled-pipeline count) has crossed CHURN_WARN_THRESHOLD and fewer than this module’s MAX_CHURN_WARNINGS have already been logged — mirroring should_warn_failure’s shape for a distinct signal. Pure: no GPU/log state touched, so the rate-limited decision is unit-testable on its own.

Detection-only, like the constant it reads: this predicate decides whether to warn, not whether to reap — ShaderEffects::reap bounds the actual growth independently of this rate limit.