Skip to content

bench(list): consolidate synthetic wt list benches into one full group - #3335

Merged
max-sixty merged 1 commit into
mainfrom
bench-full-combined
Jun 30, 2026
Merged

bench(list): consolidate synthetic wt list benches into one full group#3335
max-sixty merged 1 commit into
mainfrom
bench-full-combined

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Consolidates the narrow synthetic wt list benchmarks into a single full group backed by one combined fixture, so one bench exercises the whole surface (many worktrees AND many branches in varied states) instead of several groups that each covered worktrees-only or branches-only in a uniform state.

What changed

  • New full group (benches/list.rs) runs create_mixed_repo(24, 120) cold + warm: 24 worktrees and 120 branches in mixed clean/dirty/staged working trees and merged/ahead/diverged branch states, with branch divergence spread across history depth (the GH wt select takes 15s #461 cost driver). full/warm ≈ 147ms, full/cold ≈ 480ms locally.
  • Folded in: the old full (worktrees-only — a duplicate of worktree_scaling despite the name), many_branches (100 uniform branches), and the warm-only rerun_warm seed. No coverage dropped: worktree_scaling keeps the worktree-count scaling sweep, and the combined fixture's branch side subsumes many_branches.
  • Kept standalone: divergent_branches (the pure wt select takes 15s #461 deep-divergence stress) and worktree_scaling — both are cited in src/main.rs as the rayon_thread_count tuning anchors, and together they are the per-side regression trackers.
  • Fixture extension (create_mixed_repo in tests/helpers/wt-perf): added the deep-divergence shape it lacked — deeper base history (120 → 200 commits), checkpoints every 5, behind/diverged branches forking at points fanned across the full depth, and multi-commit diverged chains. Signature unchanged, so wt-perf setup mixed-W-B still works.
  • Attribution: a full wall time can't be decomposed by side (worktree- and branch-side git subprocesses overlap on the rayon pool), so benches/CLAUDE.md documents the wt-perf timeline args.context trace query (query Re-enable shell wrapper tests with correct fish snapshots #3) as the way to localize a regression.
  • run_benchmark now takes cold_cache: bool instead of &BenchConfig, decoupling it from the fixture type. Removed a stale timeout_effect doc reference (no such group exists).

Benchmark-only change (plus the wt-perf test helper and benches/CLAUDE.md); no production code. All six list groups compile and run; clippy -Dwarnings, fmt, and the wt-perf tests are clean.

This was written by Claude Code on behalf of max

…group

Fold the worktrees-only `full` (a duplicate of `worktree_scaling`) and the
branches-only `many_branches` into a single `full` group that runs one
combined fixture: many worktrees AND many branches in varied
clean/dirty/staged and merged/ahead/diverged states, with branch divergence
spread across history depth (the GH #461 cost driver). Cold + warm.

Extend `create_mixed_repo` with that deep-divergence shape: deeper base
history (120 -> 200 commits), finer checkpoints, behind/diverged branches
forking across the full depth, and multi-commit diverged chains. Signature
unchanged, so `wt-perf setup mixed-W-B` keeps working.

For attribution, rely on the `wt-perf timeline` `args.context` trace query: a
`full` wall time can't be split by side because the git subprocesses overlap
on the rayon pool. `worktree_scaling` and `divergent_branches` stay as the
per-side trackers (and the `rayon_thread_count` tuning anchors). `run_benchmark`
now takes `cold_cache: bool` instead of `&BenchConfig`. Drop the stale
`timeout_effect` doc reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 28c937d into main Jun 30, 2026
37 checks passed
@max-sixty
max-sixty deleted the bench-full-combined branch June 30, 2026 06:01
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.

2 participants