Classifies timer saturation in a latency sample set.
Criteria are evaluated in the fixed order 'zero-dominated' →
'low-distinct' → 'zero-mad'; the first match wins. Fewer than 10
samples are never classified — with so few measurements the criteria
cannot reliably distinguish a deterministic fast function from one truly
limited by the timer grain.
The distinct-value count is computed in O(n) by exploiting the
sorted-ascending invariant of samples and short-circuits as soon as
the threshold is reached.
Classifies timer saturation in a latency sample set.
Criteria are evaluated in the fixed order
'zero-dominated'→'low-distinct'→'zero-mad'; the first match wins. Fewer than 10 samples are never classified — with so few measurements the criteria cannot reliably distinguish a deterministic fast function from one truly limited by the timer grain.The distinct-value count is computed in O(n) by exploiting the sorted-ascending invariant of
samplesand short-circuits as soon as the threshold is reached.