Compare fixed-node performance without promoting shared CI timings
ci/woodpecker/pr/main Pipeline is pending
ci/woodpecker/push/main Pipeline was canceled

This commit is contained in:
cflmy committed 2026-11-22 22:14:07 +08:00
1 parent dd69919b48
commit 22b7757420
3 files changed
+48 -15

No files matched your search

+15 -3
View File
@@ -13,9 +13,10 @@ workload whose wire output did not match the committed expected digest.
* Release evidence needs at least 5 warmups and 20 samples per workload with
`--approved-node` on a dedicated, stable performance node. Shorter runs are
`SMOKE` and must not be cited as a release gate.
* Do not compare timings across different `platform_id`s, CPU models, kernels,
toolchains or load conditions. `--baseline` refuses a different
`platform_id`/profile.
* `--baseline` checks platform ID, build profile, CPU model, kernel,
governor, CPU affinity and toolchain. For an approved-node comparison
it also requires an approved, correctness-verified MEASURED baseline.
Record competing load and investigate differences before sign-off.
* Avoid TCG/QEMU for final performance numbers; use native or KVM with fixed
CPU affinity (`--cpu-list`) and an administrator-approved governor.
* The suggested investigation thresholds are p50 +15% and peak RSS +20%; they
@@ -43,3 +44,14 @@ source. Running `--record-expected` rewrites them: inspect the diff and commit
it only when the output change is the intended one.
`bench.py` remains only as a compatibility shim.
## RC comparison
On the approved dedicated node, run the beta benchmark from a checkout
pinned to `v3.0.0-beta.1` and the candidate benchmark from the frozen
candidate checkout. Use the same toolchain, CPU list and platform ID in both
commands. Pass the extracted, verified candidate CLI via `--no-build --binary`
and add `--baseline /path/to/beta.json` to the candidate command. Keep both
reports and confirm all nine comparisons are present and correctness-verified.
The shared Woodpecker manual workflow runs the same comparison as a diagnostic
and produces SMOKE reports.
+14 -1
View File
@@ -339,6 +339,18 @@ def compare_baseline(report: dict, baseline: dict) -> list[dict]:
)
if baseline.get("binary", {}).get("profile") != report.get("binary", {}).get("profile"):
raise SystemExit("baseline profile differs")
for field in ("kernel", "machine", "cpu_model", "governor", "cpu_list"):
if baseline["environment"].get(field) != report["environment"].get(field):
raise SystemExit(f"baseline environment.{field} differs")
for field in ("rustc", "cargo"):
if baseline["binary"].get(field) != report["binary"].get(field):
raise SystemExit(f"baseline binary.{field} differs")
if report["environment_approved"] and (
not baseline.get("environment_approved")
or baseline.get("status") != "MEASURED"
or baseline.get("correctness") != "VERIFIED"
):
raise SystemExit("approved-node comparison requires an approved, verified MEASURED baseline")
previous = {item["name"]: item for item in baseline.get("workloads", [])}
comparisons = []
for current in report["workloads"]:
@@ -415,6 +427,7 @@ def main(argv: list[str]) -> int:
order_seed = hashlib.sha256(source_sha.encode()).hexdigest()[:16]
order = list(workloads)
random.Random(order_seed).shuffle(order)
start_load = loadavg()
results = []
for workload in order:
result = run_workload(
@@ -461,7 +474,7 @@ def main(argv: list[str]) -> int:
"machine": platform.machine(),
"cpu_model": cpu_model(),
"governor": governor(),
"loadavg_start": loadavg(),
"loadavg_start": start_load,
"cpu_list": args.cpu_list or "unbound",
"python": platform.python_version(),
},