一键导入
benchmark
Run regression benchmarks, track results, and generate trend reports
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run regression benchmarks, track results, and generate trend reports
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Complete a sub-issue of an umbrella issue - close it, check parent checkbox, update design doc
Complete work on a GitHub issue - close issue, update artifacts, prompt for doc updates
Run code coverage analysis, track class-level results, and generate trend reports
Create a GitHub issue and add it to the Typhon org project
Implement a GitHub issue end-to-end — scope it (whole issue or specific phases), build an acceptance-criteria plan from its design doc, get the plan approved, then develop autonomously with tests and a mandatory code review.
Start design for a GitHub issue - creates design doc from research/ideas, updates status to Todo
| name | benchmark |
| description | Run regression benchmarks, track results, and generate trend reports |
| argument-hint | [--quick] [--report-only] [--list] [--btree-fast] [--btree-medium] [--btree-full] |
Run Typhon regression benchmarks, record results to history, and generate trend reports with regression detection.
Local runs are dev-only and DO NOT publish. The public benchmark artifact (
benchmark/reports/{latest.md,charts/}+benchmark/history/results.jsonl) is written only by CI on thez1d.metalreference box — benchmark numbers are hardware-dependent, so mixing a dev machine into the tracked trend would corrupt it. This skill therefore writes to the gitignored scratch dirbenchmark/.local/and never commits. To publish reference numbers, run the Benchmark GitHub workflow (label a PRrun-benchmark, or dispatch it). Seeclaude/design/Infrastructure/ci-merge-gate.md.
Comparison mode: Each run is compared against the immediately previous run (not an averaged baseline). This gives a clear trend view.
Noise filtering: Benchmarks are automatically classified as "noisy" (filtered from regressions) when:
min_measurable_ns (default: 1.0ns) — below BDN's measurement resolutionmax_cov_pct (default: 30%) — inherently high-variance benchmarksmin_delta_ns (default: 0.5ns) — sub-ns shifts on fast micro-benchmarks$ARGUMENTS may contain:
--quick — Run with reduced warmup/iterations for fast feedback--report-only — Skip benchmark execution, regenerate reports from existing history--list — List all regression-tracked benchmarks with their thresholds--btree-fast — BTree quick profile: core ops + 2 concurrent scenarios (~3 min)--btree-medium — BTree medium profile: all key types + concurrent scaling (~15 min)--btree-full — BTree full profile: everything including tree sizes + enumeration (~50 min)/benchmark --listList all regression-tracked benchmark classes and methods:
cd test/Typhon.Benchmark && dotnet run -c Release -- --list --allCategories Regression
Then read benchmark/config.json and display the configured thresholds per benchmark.
/benchmark --report-onlySkip benchmark execution. Regenerate reports from existing history:
python3 benchmark/scripts/report_generator.py --history benchmark/.local/results.jsonl --config benchmark/config.json --output-dir benchmark/.local/reports
Read benchmark/.local/reports/latest.md and display a condensed summary.
/benchmark --quickSame as default workflow below, but append quick-mode flags to BDN.
Clean stale artifacts first (same as Step 2 of default workflow), then run in the background (run_in_background: true) and poll with TaskOutput (block: true, timeout: 600000):
cd test/Typhon.Benchmark && dotnet run -c Release -- --allCategories Regression --exporters json --warmupCount 1 --iterationCount 2
Then continue with report generation step.
/benchmark --btree-fastBTree quick profile (~3 min). Runs benchmarks tagged BTreeFast: core single-threaded ops, 2 concurrent scenarios (read scaling + write serialization), secondary index small-delta, and 95/5 mixed workload.
Follow the same Steps 1-6 as the default workflow, but use this BDN command in Step 3:
cd test/Typhon.Benchmark && dotnet run -c Release --no-build -- --btree-fast --exporters json
Note: --btree-fast is a custom Program.cs switch that maps to --allCategories BTreeFast.
/benchmark --btree-mediumBTree medium profile (~15 min). Runs all BTreeMedium-tagged benchmarks: all key types (L16/L32/L64/String64), concurrent scaling with more thread counts, secondary index patterns.
Follow the same Steps 1-6 as the default workflow, but use this BDN command in Step 3:
cd test/Typhon.Benchmark && dotnet run -c Release --no-build -- --btree-medium --exporters json
Note: --btree-medium maps to --allCategories BTreeMedium.
/benchmark --btree-fullBTree full profile (~50 min). Runs ALL BTree benchmarks: everything from fast + medium, plus tree depth scaling (100 to 100K entries), enumeration under contention (0-32 writers), and full thread count sweep.
Follow the same Steps 1-6 as the default workflow, but use this BDN command in Step 3:
cd test/Typhon.Benchmark && dotnet run -c Release --no-build -- --btree-full --exporters json
IMPORTANT: This can take up to ~50 minutes. Run in the background and poll with TaskOutput (block: true, timeout: 3600000).
Note: --btree-full maps to --anyCategories BTreeFast BTreeMedium BTreeFull (space-separated — BDN requires separate tokens, not comma-separated).
/benchmark (default — full run + report)dotnet build -c Release test/Typhon.Benchmark/Typhon.Benchmark.csproj
If build fails, report errors and stop.
Remove prior BDN result files to prevent exploratory benchmark data from polluting the regression report:
# Windows
if exist "test\Typhon.Benchmark\BenchmarkDotNet.Artifacts\results" rmdir /s /q "test\Typhon.Benchmark\BenchmarkDotNet.Artifacts\results"
# Unix/macOS
rm -rf test/Typhon.Benchmark/BenchmarkDotNet.Artifacts/results
cd test/Typhon.Benchmark && dotnet run -c Release --no-build -- --allCategories Regression --exporters json
Note — do NOT add
--iterationTime/--warmupCounthere. A 2026-07-03 A/B/C proved global BDN mutators are not fidelity-safe for this suite:--iterationTime 250turned 16 previously-stable benchmarks noisy (e.g.Eviction_17Chunks0.9%→11.9% CoV,VersionedWriteCommit2%→27%) because the wall-time lives in the µs/ms benchmarks that need the full measurement window;--warmupCount 2saved only ~2% for real damage.[MemoryDiagnoser]stays (GC is a tracked signal). The fidelity-safe way to cut time is trimming param grids (coverage), not shortening measurement.
IMPORTANT: This step can take up to ~12 minutes, which exceeds the Bash tool's 10-minute max timeout. Run this command in the background (run_in_background: true) and poll with TaskOutput (use block: true, timeout: 600000). Let the user know benchmarks are running before starting the background task.
python3 benchmark/scripts/report_generator.py --bdn-results test/Typhon.Benchmark/BenchmarkDotNet.Artifacts/results --history benchmark/.local/results.jsonl --config benchmark/config.json --output-dir benchmark/.local/reports
Read benchmark/.local/reports/latest.md and display a condensed summary to the user:
benchmark/.local/reports/latest.mdLocal benchmark runs are dev-only. The results live in the gitignored benchmark/.local/ and
are never committed — the public reference artifact is produced solely by CI on z1d.metal
(label a PR run-benchmark, or dispatch the Benchmark workflow). Do not stage or commit anything
from this run.