Repository navigation
ci: indexing bench on pull requests, base vs head on the same runner - #13
Merged
Merged
Conversation
`bun run bench` now accepts reference repository names (eval/repos/, checked out at their pinned commit through scripts/repos.ts), `--baseline <file>` and `--bin <bin.ts>`. The new `bench` CI job indexes fastify, umami, trpc and koel with the base branch, then with the pull request, on the same runner, and fails on a >20% regression in time or peak memory. Closes #8 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
What
bun run benchaccepts reference repository names as well as paths. A name resolves throughscripts/repos.ts(from feat(eval): A/B eval runner (Claude Code with vs without Astrograph) #12) to a fresh checkout at its pinned commit, so no one has to point it at a clone by hand.--baseline <file>(default.bench-baseline.json, still gitignored) and--bin <bin.ts>(the astrograph entry point to measure; default this checkout).benchjob in CI, on pull requests only: indexes fastify, umami, trpc, koel (JS/CJS, Next.js app, TS monorepo, PHP/Laravel) with the base branch (git worktreeat$GITHUB_BASE_REF), then with the PR, and fails on >20% slower or bigger. Clones are cached by the hash ofeval/repos/*.json.Why not a committed baseline (as the issue suggested)
GitHub's shared runners change hardware between runs, so a committed number would drift with the machine, not the code. Measuring base and head on the same runner, minutes apart, compares code. No baseline file to keep up to date.
t3code is a reference repository for the eval but is left out here: it indexes 23k files (it vendors two upstream repos under
.repos/) in ~38 s / ~1 GB, too heavy for every PR.Verified
bun test,bun run typecheck,bun run checkgreen.bench --save --baseline … --bin <other checkout>thenbench --baseline …on the four names → allok(fastify 673 ms / 344 MB, umami 1045 ms / 416 MB, trpc 980 ms / 426 MB, koel 1303 ms / 400 MB on an M-series Mac).benchjob is the end-to-end test of the workflow.🤖 Generated with Claude Code