Skip to content

bench(tokens): add a dev workload (edit loop, rustc build, wide search) - #467

Merged
mrnasil merged 1 commit into
mainfrom
bench/tokens-dev-workload
Nov 25, 2026
Merged

mrnasil merged 1 commit into
mainfrom
bench/tokens-dev-workload

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 25, 2026

Copy link
Copy Markdown
Member

scripts/bench_tokens.py only had a two-turn read/grep/write/test script. It has no edit call, no compiler output and no wide search, which make up most of a real session, so the next token costs were invisible.

--workload dev (three turns):

  1. write a 320-line scratch file, read it, edit it twice, run a build that prints 120 rustc-style warning blocks (distinct names and files, lint note on the first only) and one error;
  2. grep "fn " across crates/tools/src/file, glob crates/**/*.rs, read a 120-line range;
  3. edit again and rebuild.

Edits only touch .whycodes/scratch/; the build output is a scratch log the command cats (no shell quoting), removed afterwards. --workload basic stays the default and gives the same numbers as before (116,840 on main).

On main (release, Windows, o200k): 248,340 total input, 36,046 uncached. First findings it surfaced, for follow-up PRs:

  • turn recall re-injects the current session's own earlier turns as "Past sessions" (already in context);
  • code recall injected CONTRIBUTING.md / CODE_OF_CONDUCT chunks (score 0.53) for a code-location question.

🤖 Generated with Claude Code

The basic two-turn script has no edit call, no compiler output and no wide
search, which are most of a real session. `--workload dev` runs three
turns: write a 320-line scratch file, read it, edit it twice, run a build
that prints 120 rustc-style warning blocks and an error, grep and glob
widely, read a range, then edit and rebuild. Edits only touch scratch
files; the build output is a scratch log the command cats.

The default workload is unchanged (116,840 total input on main).
dev on main: 248,340 total input, 36,046 uncached.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil merged commit b1a892a into main Nov 25, 2026
7 checks passed
@mrnasil
mrnasil deleted the bench/tokens-dev-workload branch November 25, 2026 01:39
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