bench(acpmux): bench=build-turn, an agent turn that runs a build, at each CPU class
Leo (2026-10-28): "Likewise, holy hell, the resizing of the Chromium elements. ... It's still the exact same as it was, like, 24 hours ago, where it's just slow as hell."
A measurement for the fix that starts agent harnesses at a lower CPU class on macOS (follow-up PR): what that class costs an agent turn that runs a build. Fleet measure scripts run only once they are on feat-cmux-next, so the bench lands first and the fix's PR cites its numbers.
What it adds
acpmux-overhead-bench.py --mode build-turn --build-cmd CMD: Claude Code through acpmux, each run in a fresh session. The stand-in model answers the prompt with one Bash call running CMD, then "ok". Per run it records the turn's time (prompt to turn end), the build's own seconds, and the base priority (ps -o pri=) of the shell that ran the build. A darwinbg shell shows 4 and a default one 31.scripts/measure/acpmux-overhead.sh bench=build-turn [crate=cmux-history] [n=3] [before=SHA]: the Bash call is a cold debug build of one cmux-tui crate in a fresh target dir, with the step's own cargo and rustup homes and--offlineafter acargo fetch. It runs through acpmux at this ref and atbefore=, then runs the same build directly at the default class,taskpolicy -c utilityandtaskpolicy -b, interleaved (ACPMUX-BUILD-RAWlines).
Proof it runs: a Linux smoke on cmux-ci test (fast checks run 40953723433) drove two build turns end to end. Turn end p50 was 203 ms with a stand-in build. Claude Code ends its request with a system message, so the stand-in looks for the last user message.
Risk: low. Bench only: no product code, and the existing modes are unchanged (the new mode returns before them).
Agent session: agent session
š¤ Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds bench=build-turn, a benchmark that measures what an agent turn running a build costs at each CPU class, so the follow-up fix that starts harnesses at a lower class can cite real numbers.
acpmux-overhead-bench.py --mode build-turnruns Claude Code through acpmux in a fresh session per turn; the stand-in answers the prompt with one Bash call running--build-cmd, and records the turn's time, the build's seconds, and the shell's base priority.acpmux-overhead.sh bench=build-turnwraps a cold debug build of a cmux-tui crate as the build command, then runs the same build directly at default, utility, and background classes (taskpolicy) for comparison, interleaved.- Bench only: no product code, and the existing modes return before the new one, so they are unchanged.