Skip to content

ASAP sketch benchmark #60

ASAP sketch benchmark

ASAP sketch benchmark #60

name: ASAP sketch benchmark
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/asap-sketch-benchmark.yml"
- "asap-precompute-rs/**"
- "benchmarks/**"
schedule:
- cron: "30 2 * * *"
permissions:
contents: read
concurrency:
group: asap-sketch-nightly
cancel-in-progress: false
jobs:
benchmark:
runs-on: ubuntu-24.04
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: asap-precompute-rs
- name: Test streaming window correctness
run: cargo test --manifest-path asap-precompute-rs/Cargo.toml --release --features stream-benchmark --bin asap-stream-bench
- name: Run persistent OTLP network benchmark
run: ./benchmarks/run-nightly.sh --allow-shared-infrastructure
- name: Verify streaming measurements
run: |
python3 - <<'PYCODE'
import json
from pathlib import Path
root = Path("benchmark-results/streaming")
runs = json.loads((root / "runs.json").read_text())
summary = json.loads((root / "summary.json").read_text())
capacity = json.loads((root / "capacity.json").read_text())
assert len(runs) == 189
assert len(summary) == 63
assert len(json.loads((root / "resources.json").read_text())) == 441
assert len(capacity) == 3
assert all(row["repetitions"] == 3 for row in summary)
assert all("sustainable" in row for row in summary)
for run in runs:
assert run["correctness"] == "passed"
assert run["completed_windows"] >= 2
assert run["signals_per_second"] > 0
assert run["generated_signals_after_drain"] == run["validated_signals_after_drain"] > 0
assert len(run["resources"]) == 7
for role in ("branch_a", "branch_b", "merge", "estimate"):
resource = run["resources"][role]
assert resource["data_rx_bytes"] > 0 and resource["data_tx_bytes"] > 0
assert resource["cpu_seconds"] > 0
for path in root.glob("traffic-*-sps/window-*/*mbit/*/*/config.json"):
config = json.loads(path.read_text())
assigned = list(config["component_cores"].values())
assert len(assigned) == 4 and len(set(assigned)) == 4
assert config["placement"] in {"exclusive-capacity", "shared-infrastructure-smoke"}
if config["placement"] == "exclusive-capacity":
assert set(config["generator_cores"]).isdisjoint(assigned)
assert (root / "throughput.svg").is_file()
assert (root / "resources.svg").is_file()
PYCODE
- name: Upload review artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: asap-sketch-benchmark-${{ github.run_id }}
path: |
benchmark-results/
retention-days: 30