Skip to content

Commit a6ae63c

Browse files
cknittclaude
andauthored
Benchmark project builds and output sizes in CI (#9272)
The benchmarks only replayed single bsc calls, so the build system's own work never showed. They now also build the base's tests/tests on one worker domain (clean, no-op, leaf edit, shared edit), adding the workers' allocations the build reports, and measure the .cmi/.cmti/.cmt/.cmj sizes and the playground bundle. Only the no-op and leaf-edit builds run under cachegrind: the larger ones take minutes, and with two domains collecting their instructions depend on how the domains interleave. Review: Why build the base's tests/tests on both sides? The base compiler builds them already, so a pull request adding tests with new syntax can't break the base measurement. Claude-Session: https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm Signed-off-by: Christoph Knittel <ck@cca.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ef5d33e commit a6ae63c

3 files changed

Lines changed: 311 additions & 19 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,12 @@ jobs:
428428
git worktree add --detach "$RUNNER_TEMP/base" HEAD^1
429429
opam exec -- dune build --root "$RUNNER_TEMP/base" --display quiet
430430
431+
# For the size of the bundle only; the playground is tested elsewhere.
432+
- name: Build the playground compilers
433+
run: |
434+
opam exec -- make playground-compiler
435+
opam exec -- make -C "$RUNNER_TEMP/base" playground-compiler
436+
431437
- name: Measure and compare
432438
env:
433439
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
@@ -437,12 +443,14 @@ jobs:
437443
# little, and the instructions of the runtime and Belt files by up
438444
# to 0.2%. The runtime and Belt are built there too, since the
439445
# replayed builds would otherwise write interfaces that don't
440-
# match those of the files they don't replay yet.
446+
# match those of the files they don't replay yet. Both build the
447+
# base's tests/tests, which the base's compiler builds already.
441448
measure() {
442449
sudo mkdir -p /bench
443450
sudo mount --bind "$1" /bench
444451
node scripts/compilerBenchmarks.js prepare /bench
445-
node scripts/compilerBenchmarks.js measure /bench "$2" --instructions
452+
node scripts/compilerBenchmarks.js measure /bench "$2" --instructions \
453+
--project "$RUNNER_TEMP/base" --playground
446454
sudo umount /bench
447455
}
448456
measure "$RUNNER_TEMP/base" "$RUNNER_TEMP/base.json"

0 commit comments

Comments
 (0)