Skip to content

The benchmark runner is With (run.py deleted); :benchmarks-check gates every workload; with run forwards every argument after the file - #1942

Merged
ehartford merged 6 commits into
mainfrom
bench-in-with
Sep 30, 2026
Merged

ehartford merged 6 commits into
mainfrom
bench-in-with

Conversation

@ehartford

Copy link
Copy Markdown
Contributor
  • benchmarks/run.py (Python, a CLAUDE.md violation) ported to benchmarks/run.w: same CLI, same results.md/.csv/.json; checksums and RSS identical, wall times no longer include /usr/bin/time.
  • std.process: run_to_files / run_to_files_in (exit code, timeout, peak RSS, captured output). std.json: json_quote public, escapes all control chars.
  • Driver fix: with run tool.w -n 5 was eaten as the -n one-liner (silent no-op, rc 0), and with tool.w a b forwarded nothing; now everything after the source file goes to the program (cli-selfhost-one-liner-tests cases added).
  • :benchmarks-check (in the gate's fixed list): with check on every workload and run.w; red on the pre-fix ecs.w, green after.
    Includes the ecs.w fix also on Aggregates over two words cross With calls through memory (ABI v11): compiler build 115s -> 46s #1939; it drops out on rebase after #1940 merges. Gate green. Battery with the next batch.

@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on stack top 3743c81 (seed-driven, with run tools/battery.w; stack #1943 = #1934 → #1942): gate rc=0, battery-checks rc=0 wall=198s. Prior run on 2152374 was RED on c-migrator-core-tests alone (builtin_overflow_u128_limb_helper expected pre-#1933 helper parameter names); fixed in de9d19f. The rebase onto main resolved a CImport.w conflict (discarded && / ||): main's guarded-if kept, #1911's fail-loud assignment and operand-effects merge kept; conflict-area tests pass.

@ehartford
ehartford marked this pull request as ready for review September 30, 2026 16:58
Base automatically changed from fix-1911 to main September 30, 2026 16:59
Eric Hartford added 6 commits September 30, 2026 12:59
…k RSS; std.json escapes every control character and exports json_quote

run_to_files spawns, waits at a thousandth of the run time so far (20 us
to 1 ms), kills the group at its timeout, and returns the exit code, the
timeout verdict and the reaped child's peak RSS; run_to_files_in runs from
a directory. A benchmark's wall clock around the call measures the child,
not the runtime's 10 ms timed-wait tick. json_quote escaped only \n \r \t:
a raw ESC from a colored compiler diagnostic made the document invalid.
…ver reads only the arguments through it

`with run tool.w -n 5` became the -n one-liner over an empty stdin, printed
nothing and exited 0; -e/-p, --debug-alloc and -O<n> after the source were
likewise taken by the driver. The implicit `with tool.w a b` forwarded
nothing at all: run_program_args scanned for the source from argv[2], and
the implicit form has it at argv[1]. cli_driver_argc is the one place that
says where the driver's arguments end; run_program_args forwards the rest.
cli-selfhost-one-liner-tests pins both forms.
A port of run.py with its CLI (-w, -l, -n, --full, --timeout, -o, --keep),
reports (results.md, .csv, .json) and verdicts (checksum agreement, median
wall and hot-loop times, max peak RSS, stripped size, cold compile after a
warm one, missing toolchains skipped). Differences, each deliberate:
- Runs are started by the runner (std.process.run_to_files), not under
  /usr/bin/time; the peak RSS is the same rusage field time read, so the
  column matches byte for byte, and the wall clock no longer includes
  time's own fork and exec (hello: 3 ms, was 5.6 ms).
- Seconds are written at nanosecond precision without float noise
  (0.216053, not 0.21362683300000018).
- A CSV field holding a comma is quoted ("Hello, World!" split its row).
- JSON strings keep UTF-8 as is and escape every control character.
…r; the gate runs it

Nothing compiled benchmarks/workloads/*/*.w, so ecs.w stopped compiling
and nobody knew until the comparison was run by hand. The lane runs
`with check` (never build or run) with the release compiler on every With
workload and benchmarks/run.w, in parallel (4.8 s), and names each file
that fails. Red with ecs.w reverted to its pre-f6b57485 text:
  benchmarks-check: benchmarks/workloads/ecs/ecs.w failed `with check` with exit code 1
  error: cannot mutate `self` while `id` is a live view into it
@ehartford
ehartford merged commit 40aaf6f into main Sep 30, 2026
@ehartford
ehartford deleted the bench-in-with branch September 30, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant