| 36 | 36 | ## Results over time (issue #101) |
| 38 | | −`.toboggan/workflows/bench.yml` runs `scripts/bench-track.sh` on a dedicated, quiet runner labelled `louise-bench`: by hand, and on each push to `main` once the repository variable `LOUISE_BENCH_ENABLED` is `true`. The script runs `scripts/bench.sh` and `scripts/bench-compile.sh`, and counts each benchmark's user-space instructions with `perf stat --no-scale` on one scheduler thread (skipped without perf). Counted that way, they are the same to a few parts in 10^8 from run to run; on 22 threads, stealing and spinning vary them by 0.3–1.5%. On a hybrid CPU the per-core-type counts are summed, and not scaled: perf's default scaling, meant for multiplexed counters, counted up to 30% too many. |
| 38 | +`.toboggan/workflows/bench.yml` runs `scripts/bench-track.sh` on a dedicated, quiet runner labelled `louise-bench`, by hand (`workflow_dispatch`) until that runner is registered; then on each push to `main` too (the workflow's comment says how, and why not before). The script runs `scripts/bench.sh` and `scripts/bench-compile.sh`, and counts each benchmark's user-space instructions with `perf stat --no-scale` on one scheduler thread (skipped without perf). Counted that way, they are the same to a few parts in 10^8 from run to run; on 22 threads, stealing and spinning vary them by 0.3–1.5%. On a hybrid CPU the per-core-type counts are summed, and not scaled: perf's default scaling, meant for multiplexed counters, counted up to 30% too many. |
| 40 | 40 | Results stay on the runner, in `LOUISE_BENCH_DIR` (default `~/louise-bench`): one CSV per commit (`commit,benchmark,metric,value`; metrics `ms`, `compile_ms`, `instructions`), and `index`, the commits in the order they ran. Each run is compared with the previous one. Regressions beyond `BENCH_THRESHOLD_MS` (default 10%) or `BENCH_THRESHOLD_INSTRUCTIONS` (default 1%) are written to `<commit>.report` and printed, without failing the run. With the secret `LOUISE_BENCH_TOKEN` (a personal token) and the variable `LOUISE_BENCH_ISSUE` (an issue number), the workflow also posts them on that issue. |