spc — real change or noise?
Shewhart control charts (XmR for durations, p charts for failure rates) with the Western Electric rules, named by definition: a point beyond 3 sigma, 2 of 3 beyond 2 sigma, 4 of 5 beyond 1 sigma, a run of N on one side. Each signal comes with the runs where it started and the candidate commit range.
When to use
"CI got slower" or "flakes are up" and you have a few dozen comparable runs or days.
When NOT to use this
- To find the cause: it narrows the window (58 commits in the real case below), it does not name the commit.
- With fewer than about 20 points, or a series that mixes different things (all jobs, different runners).
- As an alert with all four rules on raw durations: on pure noise, 49% of 50-point series raise at least one
signal. Use
--rules beyond-3sigma,run --window 5(the GitHub Action's defaults) and read 1- and 2-sigma signals as weak.
Real case from the eval
228 successful runs of pytest's test.yml on main. With windows of 5, one signal: a sustained drop of about 4
minutes, completed in the window that holds the first run after pytest#15255 (which removed quadratic work when
creating temp dirs). Median 15.5 → 13.4 min. Plausible cause, not proven. Details: evaluation.
Try it
clarent spc chart --gh-json methods/spc/examples/gh-pytest-main-runs.json --window 5
clarent spc chart --from-gh-runs ci.yml --window 5 --svg ci.svg
clarent spc falsealarm --length 50
methods/spc/CARD.md.