Benchmark the verified archive on release staging branches
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/manual/performance Pipeline was successful

This commit is contained in:
Codex committed 2026-11-23 22:19:57 +08:00
1 parent 58fccae303
commit af1e07f3d7
3 files changed
+19 -7

No files matched your search

+12 -4
View File
@@ -2,15 +2,15 @@
# Shared-node measurements may support an explicitly approved RC WARN. # Shared-node measurements may support an explicitly approved RC WARN.
when: when:
event: [manual] event: [manual]
branch: [master] branch: [master, "release/*"]
steps: steps:
measure: measure:
image: rust:1.100-bookworm image: rust:1.100-bookworm
commands: commands:
- apt-get update - apt-get update
- apt-get install -y --no-install-recommends python3 util-linux ca-certificates git build-essential - apt-get install -y --no-install-recommends python3 util-linux ca-certificates git openssl build-essential
- cargo build --release --locked -p marqdo-cli - cargo build --release --locked -p marqdo-cli -p marqdo-provider-worker
- | - |
set -eu set -eu
baseline_sha=2c7c4f31e7a388d3fcfa717a77067e696ed13854 baseline_sha=2c7c4f31e7a388d3fcfa717a77067e696ed13854
@@ -21,6 +21,14 @@ steps:
trap 'git worktree remove --force "$perf_dir/beta"; rm -rf "$perf_dir"' EXIT trap 'git worktree remove --force "$perf_dir/beta"; rm -rf "$perf_dir"' EXIT
(cd "$perf_dir/beta" && cargo build --release --locked -p marqdo-cli) (cd "$perf_dir/beta" && cargo build --release --locked -p marqdo-cli)
version="$(target/release/marqdo --version | cut -d ' ' -f 2)"
python3 tools/release/package.py --version "$version" --source-sha "$CI_COMMIT_SHA" --out-dir "$perf_dir"
archive="$perf_dir/marqdo-$version-x86_64-unknown-linux-gnu.tar.gz"
(cd "$perf_dir" && sha256sum -c "$(basename "$archive.sha256")")
tar -xzf "$archive" -C "$perf_dir"
candidate="$perf_dir/marqdo-$version-x86_64-unknown-linux-gnu"
test "$(cat "$candidate/SOURCE_SHA")" = "$CI_COMMIT_SHA"
allowed="$(awk '/^Cpus_allowed_list:/ {print $2}' /proc/self/status)" 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)}" 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_NODE host=$(uname -n) kernel=$(uname -r) arch=$(uname -m) allowed_cpus=$allowed pin=$cpu_list"
@@ -29,7 +37,7 @@ steps:
(cd "$perf_dir/beta" && python3 tools/perf/runner.py --no-build \ (cd "$perf_dir/beta" && python3 tools/perf/runner.py --no-build \
--warmups 5 --samples 20 --platform-id woodpecker-agent-1 \ --warmups 5 --samples 20 --platform-id woodpecker-agent-1 \
--cpu-list "$cpu_list" --out "$perf_dir/beta.json" > /dev/null) --cpu-list "$cpu_list" --out "$perf_dir/beta.json" > /dev/null)
python3 tools/perf/runner.py --no-build --warmups 5 --samples 20 \ python3 tools/perf/runner.py --no-build --binary "$candidate/marqdo" --warmups 5 --samples 20 \
--platform-id woodpecker-agent-1 --cpu-list "$cpu_list" \ --platform-id woodpecker-agent-1 --cpu-list "$cpu_list" \
--baseline "$perf_dir/beta.json" --out perf.json > /dev/null --baseline "$perf_dir/beta.json" --out perf.json > /dev/null
python3 - <<'PY' python3 - <<'PY'
+4 -2
View File
@@ -55,5 +55,7 @@ candidate checkout. Use the same toolchain, CPU list and platform ID in both
commands. Pass the extracted, verified candidate CLI via `--no-build --binary` commands. Pass the extracted, verified candidate CLI via `--no-build --binary`
and add `--baseline /path/to/beta.json` to the candidate command. Keep both and add `--baseline /path/to/beta.json` to the candidate command. Keep both
reports and confirm all nine comparisons are present and correctness-verified. reports and confirm all nine comparisons are present and correctness-verified.
The shared Woodpecker manual workflow can reproduce the comparison and The shared Woodpecker manual workflow runs on master and release branches.
produces SMOKE reports. It packages the candidate, checks its checksum and source SHA, then measures
the extracted binary with the shipped stdlib. Shared-node runs produce SMOKE
reports for review under the release policy.
+3 -1
View File
@@ -244,7 +244,9 @@ def run_workload(
prefix = [shutil.which("taskset") or "taskset", "-c", cpu_list] prefix = [shutil.which("taskset") or "taskset", "-c", cpu_list]
argv = prefix + [str(binary)] + workload["argv"] argv = prefix + [str(binary)] + workload["argv"]
env = dict(os.environ) env = dict(os.environ)
env["MARQDO_STDLIB_DIR"] = str(ROOT / "stdlib") env.pop("MARQDO_STDLIB_DIR", None)
if not (binary.parent / "stdlib" / "stdlib.json").is_file():
env["MARQDO_STDLIB_DIR"] = str(ROOT / "stdlib")
env.setdefault("NO_COLOR", "1") env.setdefault("NO_COLOR", "1")
expected = load_expected(name) expected = load_expected(name)
result = { result = {