Prepare Marqdo CLI 3.0.0-rc.1 for Linux x86_64 #6

Merged
cflmy merged 6 commits from release/3.0.0-rc.1 into master 2026-11-22 22:29:01 +08:00
3 changed files with 48 additions and 15 deletions
Showing only changes of commit 22b7757420 - Show all commits

No files matched your search

+19 -11
View File
@@ -1,11 +1,5 @@
# G4 fixed performance node.
#
# Manual only: this workflow never runs on push or pull_request and therefore
# never executes untrusted PR code on the designated performance agent. The
# repository currently has one Woodpecker agent (agent_id 1), so it is the
# fixed node; the CPU affinity and hardware/toolchain manifest are recorded in
# every report. Do not compare its timings with another machine or with
# QEMU/TCG.
# Manual performance comparison on the shared Woodpecker runner.
# G4 release evidence is measured separately on the approved dedicated node.
when:
event: [manual]
branch: [master]
@@ -15,18 +9,29 @@ steps:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends python3 util-linux ca-certificates
- apt-get install -y --no-install-recommends python3 util-linux ca-certificates git build-essential
- cargo build --release --locked -p marqdo-cli
- |
set -eu
baseline_sha=2c7c4f31e7a388d3fcfa717a77067e696ed13854
git fetch --no-tags origin refs/tags/v3.0.0-beta.1
test "$(git rev-parse 'FETCH_HEAD^{commit}')" = "$baseline_sha"
perf_dir="$(mktemp -d)"
git worktree add --detach "$perf_dir/beta" "$baseline_sha"
trap 'git worktree remove --force "$perf_dir/beta"; rm -rf "$perf_dir"' EXIT
(cd "$perf_dir/beta" && cargo build --release --locked -p marqdo-cli)
allowed="$(awk '/^Cpus_allowed_list:/ {print $2}' /proc/self/status)"
cpu_list="${MARQDO_PERF_CPU_LIST:-$(printf '%s' "$allowed" | cut -d, -f1 | cut -d- -f1)}"
echo "G4_NODE host=$(uname -n) kernel=$(uname -r) arch=$(uname -m) allowed_cpus=$allowed pin=$cpu_list"
echo "G4_CPU $(awk -F: '/model name/ {print $2; exit}' /proc/cpuinfo | xargs)"
echo "G4_GOVERNOR $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null || echo unavailable)"
(cd "$perf_dir/beta" && python3 tools/perf/runner.py --no-build \
--warmups 5 --samples 20 --platform-id woodpecker-agent-1 \
--cpu-list "$cpu_list" --out "$perf_dir/beta.json" > /dev/null)
python3 tools/perf/runner.py --no-build --warmups 5 --samples 20 \
--approved-node --platform-id woodpecker-agent-1 \
--cpu-list "$cpu_list" --out perf.json
--platform-id woodpecker-agent-1 --cpu-list "$cpu_list" \
--baseline "$perf_dir/beta.json" --out perf.json > /dev/null
python3 - <<'PY'
import json
@@ -47,6 +52,9 @@ steps:
f"rss={workload.get('max_rss_kb_median')}"
)
PY
echo "G4_BASELINE_REPORT_BEGIN"
cat "$perf_dir/beta.json"
echo "G4_BASELINE_REPORT_END"
echo "G4_REPORT_BEGIN"
cat perf.json
echo "G4_REPORT_END"
+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(),
},