Skip to content

feat(bench): split each cell into startup and work against a floor fixture#173

Merged
BryanFRD merged 1 commit into
mainfrom
feat/startup-vs-work
Jul 15, 2026
Merged

feat(bench): split each cell into startup and work against a floor fixture#173
BryanFRD merged 1 commit into
mainfrom
feat/startup-vs-work

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #172. 1/3 — the consumer side is FerrLabs/FerrFlow (floor fixture + shard wiring) and the chart is FerrLabs/FerrFlow-Cloud.

Every bar is one number today, so "the tool is slow" and "Node is slow to start" are indistinguishable. For the JS tools startup is most of the bar, and on the two cells where FerrFlow looks slower it is the whole story.

Each cell now also carries startup_ms and work_ms, derived from a floor fixture — one package, one commit since the last tag — benchmarked with each tool’s normal command. That median is the tool’s fixed cost of being invoked at all: process spawn, runtime boot, module loading, config resolution.

work_ms = median_ms - startup_ms

Why not --version. It is the obvious floor and it is wrong: it skips the lazy requires the real command pulls in, so it undercounts startup and bills the difference as the tool’s work. Measured at ~286 ms for commit-and-tag-version — and the error flatters us, which is exactly why it can’t ship. The floor runs the real command instead.

median_ms stays the headline, untouched. Startup is real time the user waits. The split explains where it goes; it doesn’t get to redefine the score. That’s the same rule as --jobs 1 vs ferrflow_parallel and cold vs ferrflow_cached.

Shape. floor is just another fixture, so no new hyperfine plumbing. derive-work.sh subtracts, drops the floor cells from benchmarks (an instrument, not a data point — the site would otherwise render floor as a fixture), and writes the two fields into each cell. Because they live inside the cell, merge-results.sh needs no change and each shard subtracts the floor measured on its own runner — which matters, since shards land on different machines. The floor is excluded from the ferrflow_parallel and ferrflow_cached stats; those are about big repos.

Backward compatible: no floor directory in fixtures-dir means no derivation and an unchanged latest.json, so the current FerrFlow pin keeps working until it moves.

Worked example on real cold numbers from run 29416210326:

cell total startup work
mono-large ferrflow 1157 ms 5 ms 1152 ms
mono-large changesets 987 ms 700 ms 287 ms
mono-large commit-and-tag-version 2039 ms 520 ms 1519 ms

It reads honestly in both directions: we beat commit-and-tag-version on work alone, not just on startup — and 71% of the changesets bar it "wins" with is Node booting.

Tests. 9 bats, covering the subtraction, the clamp at zero, floor removal, per-tool/method/command matching, a missing floor, no floor at all, and metadata survival. The per-tool matching test caught a real jq scoping bug — in $k | endswith("-" + .) the . binds to $k, not to the select element, so every cell silently matched the wrong floor or none. Without that test it would have shipped green.

@BryanFRD BryanFRD enabled auto-merge (squash) July 15, 2026 18:08
@BryanFRD BryanFRD merged commit e1237b5 into main Jul 15, 2026
14 checks passed
@BryanFRD BryanFRD deleted the feat/startup-vs-work branch July 15, 2026 18:08
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.

Split each bar into startup vs work, measured against a floor fixture

1 participant