perf-benchmarker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseperf-benchmarker
perf-benchmarker
Run sequential benchmarks with strict duration rules.
Follow as the canonical contract.
docs/perf-requirements.md运行遵循严格时长规则的连续基准测试。
请以作为标准约定。
docs/perf-requirements.mdRequired Rules
强制规则
- Benchmarks MUST run sequentially (never parallel).
- Minimum duration: 60s per run (30s only for binary search).
- Warmup: 10s minimum before measurement.
- Re-run anomalies.
- 基准测试必须连续运行(绝不能并行)。
- 最短时长:单次运行60秒(仅Binary Search场景为30秒)。
- 预热:测量前至少预热10秒。
- 异常情况需重新运行。
Output Format
输出格式
command: <benchmark command>
duration: <seconds>
warmup: <seconds>
results: <metrics summary>
notes: <anomalies or reruns>command: <benchmark command>
duration: <seconds>
warmup: <seconds>
results: <metrics summary>
notes: <anomalies or reruns>Output Contract
输出约定
Benchmarks MUST emit a JSON metrics block between markers:
PERF_METRICS_START
{"scenarios":{"low":{"latency_ms":120},"high":{"latency_ms":450}}}
PERF_METRICS_END基准测试必须在标记之间输出JSON指标块:
PERF_METRICS_START
{"scenarios":{"low":{"latency_ms":120},"high":{"latency_ms":450}}}
PERF_METRICS_ENDConstraints
约束条件
- No short runs unless binary-search phase.
- Do not change code while benchmarking.
- 除非处于Binary Search阶段,否则不允许短时长运行。
- 基准测试期间不得修改代码。