Repository navigation
ci: hot-path performance gate (instruction counts) and wall-clock A/B - #270
Conversation
🤖 Claude Code ReviewReview: PR #270, hot-path perf gateThe approach is sound: callgrind on deterministic workloads, differencing two sizes to cancel setup, the same driver in both trees, and an always-reporting required check. These are the issues I found, most important first. Correctness / robustness1. The head driver is compiled against the base tree (
2. Scope filter misses dependency changes (
3.
4.
5. Ops accounting assumes
6. Division by
Minor
Looks good
Automated review by Claude · claude-opus-5-5 · custom prompt |
🤖 Gemini Code ReviewThis PR is well-designed and clearly documented. Using Callgrind instruction differencing across two workload sizes on a A few minor suggestions:
Automated review by Gemini · gemini-4-argon · custom prompt |
🤖 Codex Code Review
Rust validation was blocked by the read-only rustup directory; Valgrind is also unavailable locally. Automated review by OpenAI Codex · gpt-6.1-sol · custom prompt |
🤖 Grok Code ReviewThe gate design is sound: one shared driver, callgrind differencing to cancel setup, and only the deterministic cases are required. A few issues can flake or break the check. Correctness
CI reliability
Smaller
Automated review by Grok (xAI) · grok-4.7 · custom prompt |
🤖 Kimi Code ReviewFindings
Otherwise, the measurement design looks sound: per-side target directories, ABBA pairing, completed-send fencing, deterministic benchmark selection, and worktree cleanup are all handled carefully. Automated review by Kimi (Moonshot AI) · kimi-k3.1-pro · custom prompt |
🤖 DeepSeek Code ReviewAutomated review by DeepSeek |
🤖 DeepSeek Code ReviewOverall this is a solid CI-only addition: the worktree isolation, instruction-difference method, and ABBA pairing are well thought out. A few issues worth addressing before merge:
None of these are blockers if the defaults are always used, but the driver is a benchmarking tool that should be robust to custom Automated review by DeepSeek · deepseek-v4-pro · custom prompt |
What and why
The 0.8 release gate found async burst −37% and default
request()−24% against main, by hand, on fede. This adds a check that catches that class of regression on every PR touching the hot path.benchmarks/hotpath/driver.rs: one portable driver (#[actor]handlers,request(),send()only, so it builds on any recent revision).hotpath.pycopies the head's driver into both trees, so base and head run the same workload.benchmarks/hotpath.py gate(CI): instructions per operation under callgrind, at 2,000 and 6,000 operations (differenced, so process start and setup cancel), median of 3, head vs merge base. Fails if any benchmark grows more than 3% (--threshold,HOTPATH_THRESHOLDin the workflow). Per-benchmark table in the job summary.request(), 16-taskrequest(),sendfrom 1 and 2 producers: identical counts run to run) and threads-mode sequentialrequest()(within 0.5% on fede, 0.9% on the runner). Multi-thread runtimes and free-running OS-thread producers vary up to ±20% in instructions from run to run, so threads-mode burst/send and the multi-thread async variants are wall-clock only.benchmarks/hotpath.py abba(manual, pre-release): wall-clock ABBA A/B on fixed cores, median and range; added to the release checklist..github/workflows/perf-gate.yml: on every PR andmerge_group, but it only builds and measures whenconcurrency/src,rt/src,macros/srcor the driver changed; otherwise it passes with a "skipped" summary, so it can be a required check (apaths:filter would leave a required check pending).How it was verified
Self-test on fede (nice 19).
main vs main (two runs), all PASS: every async benchmark 0.0% (spread ±0),
threads_request_seq+0.1% / +0.2%. Same on the GitHub runner (this PR's ownperf-gaterun): async 0.0%, threads −0.9%.#240 head
7f716152vs main0791ace5: FAIL, exit 1:async_ct_burstasync_ct_request_seqasync_ct_request_conc16async_ct_send_p1async_ct_send_p2threads_request_seqLimit: instruction counts miss contention, wake-ups and cache-line traffic, so the wall-clock A/B stays a release step (docs/TESTING.md, "Performance gate").