Skip to content
Myr

Fix outlier detection for "fast outliers"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #329

authored by sharkdp · committed by David Peter · parent daf5ced · Browse files · 3 files+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+3 added−2 removed

  • other:+3 added−2 removed

3 files+3 added−2 removed

modified:src/hyperfine/benchmark.rs+1 added-1 removed
390 unmodified lines
391 // Run outlier detection392 let scores = modified_zscores(&times_real);393 if scores[0] > OUTLIER_THRESHOLD {394 warnings.push(Warnings::SlowInitialRun(times_real[0]));395 } else if scores.iter().any(|&s| s > OUTLIER_THRESHOLD) {395 } else if scores.iter().any(|&s| s.abs() > OUTLIER_THRESHOLD) {396 warnings.push(Warnings::OutliersDetected);397 }398399 if !warnings.is_empty() {
33 unmodified lines
modified:src/hyperfine/outlier_detection.rs+1 added-1 removed
10 unmodified lines
11/// of standard deviations.12pub const OUTLIER_THRESHOLD: f64 = 1.4826 * 10.0;1314/// Compute modifized Z-scores for a given sample. A (unmodified) Z-score is defined by15/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `|x_i - x_median|/MAD`15/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `(x_i - x_median)/MAD`16/// where MAD is the median average deviation.17///18/// References:19/// - <https://en.wikipedia.org/wiki/Median_absolute_deviation>
82 unmodified lines
modified:CHANGELOG.md+1 added
19 unmodified lines
20- The `plot_parametrized.py` script now infers the parameter name, and its `--parameter-name` argument has been deprecated. See #253, #318.2122## Bugfixes2324- Fix a bug in the outlier detection which would only detect "slow outliers" but not the fast ones (runs that are much faster than the rest of the benchmarking runs), see #32925- Keep output colorized when the output is not interactive and `--style=full` or `--style=color` is used.2627## Other28## Packaging
208 unmodified lines