diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8b935d55..cda4414d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -92,7 +92,7 @@ jobs: # #1) while keeping the step a hard gate: pipefail preserves cargo's exit # code (each bench asserts its own absolute ceiling) even through tee. set -o pipefail - cargo test -p alkane-gui -p alkane-artifacts --release --offline -- --ignored --nocapture bench_ \ + cargo test -p alkane-gui -p alkane-artifacts --release --offline -- --ignored --nocapture bench_ --test-threads=1 \ | tee bench-current.txt - name: Record private benchmark history diff --git a/.gitea/workflows/verify.yml b/.gitea/workflows/verify.yml index d81b34f7..fa908df1 100644 --- a/.gitea/workflows/verify.yml +++ b/.gitea/workflows/verify.yml @@ -55,7 +55,7 @@ jobs: cargo test -p alkane-artifacts -p alkane-flash -p alkane-cli --offline - name: Microbenchmarks - run: cargo test -p alkane-gui -p alkane-artifacts --release --offline -- --ignored --nocapture bench_ + run: cargo test -p alkane-gui -p alkane-artifacts --release --offline -- --ignored --nocapture bench_ --test-threads=1 - name: Headless UI self-test run: | diff --git a/README.md b/README.md index 6702fbf8..20f5e95b 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ runs are queued. Badge SVGs are stored in a private, machine-maintained branch. The code-quality letter requires warnings-denied Clippy and measured test plus UI self-test line coverage: A at 90%, B at 80%, C at 70%, D at 60%, and F below 60%. A missing coverage measurement displays pending. +The benchmark delta compares an earlier commit only when its CPU class +matches the current dedicated runner; otherwise it establishes a new +baseline. Main CI runs microbenchmarks serially to avoid test contention. A cross-platform desktop toolkit for discovering, monitoring, and re-flashing ASIC miners. It scans a fleet over the network, shows live health and hashrate diff --git a/ci/bench_history.py b/ci/bench_history.py index 2f225f7f..d52bc735 100644 --- a/ci/bench_history.py +++ b/ci/bench_history.py @@ -17,6 +17,7 @@ from urllib.error import HTTPError from urllib.parse import quote from badge_store import BADGE_BRANCH, publish_file, request_json +from bench_host import identity as benchmark_host bench_spec = importlib.util.spec_from_file_location( "bench_badge", Path(__file__).with_name("bench-badge.py")) @@ -59,13 +60,15 @@ def git_distance(ancestor: str, sha: str) -> int | None: return int(result.stdout.strip()) if ancestor_check.returncode == 0 else None -def previous_measurement(index: dict, sha: str, distance=None) -> dict: +def previous_measurement(index: dict, sha: str, distance=None, host=None) -> dict: distance = distance or git_distance choices = [] for entry in index.get("entries", []): ancestor = entry.get("sha") if ancestor == sha or not isinstance(ancestor, str): continue + if host is not None and entry.get("metrics", {}).get("bench_host") != host: + continue gap = distance(ancestor, sha) if gap is not None and gap > 0: choices.append((gap, entry)) @@ -95,6 +98,9 @@ def render_html(index: dict) -> str: cells = [f'
Most recent {len(entries)} measured commits. Full per-commit JSON is retained " "in the private ci-badges branch.
" f"| Commit | " - f"UTC | {headings}UTC | CPU | {headings}{''.join(rows)}" "
|---|