Skip to main content

summarize

Function summarize 

Source
pub fn summarize(samples_ms: &[f64]) -> Option<Summary>
Expand description

Summarize raw timings. The Tukey fences (1.5 IQR) run first; the median CI uses the normal approximation to the binomial order-statistic interval, clamped to the sample range.

§NaN

A NaN timing cannot be ordered against anything, so the sort uses f64::total_cmp, which is total: -NaN sorts below -inf and +NaN above +inf. A NaN then fails both fence comparisons and is rejected as an outlier, counted in outliers_rejected. If enough of them poison the quantiles that nothing survives the fences, the result is None — which is the honest summary of a sample that has none. Nothing here panics on a NaN, and no NaN reaches median_ms.