Skip to content

Support single-file sizing and multiple candidate branches in benchmark.sh#116

Merged
sirbrillig merged 2 commits into
trunkfrom
benchmark-single-file-and-multiple-candidates
May 24, 2026
Merged

Support single-file sizing and multiple candidate branches in benchmark.sh#116
sirbrillig merged 2 commits into
trunkfrom
benchmark-single-file-and-multiple-candidates

Conversation

@sirbrillig

@sirbrillig sirbrillig commented May 24, 2026

Copy link
Copy Markdown
Owner

This modifies the benchmark script to support more options. This is useful for comparison of approaches in #115.

Adds LINES_PER_FILE to size each generated file, and CANDIDATES to compare multiple branches against trunk in one hyperfine run. Worktrees are now created with --detach so trunk can be benchmarked even when checked out
in the main worktree.

Add CACHE_MODE to benchmark.sh for cold/hot/partial cache scenarios

Adds --cache via CACHE_MODE=hot and a partial-cache mode that dirties file1.php before each iteration so the modified-side cache misses while the unmodified-side cache (keyed on git revision) still hits. Each benchmark also clears the cache via hyperfine --setup so branches start fresh.

…rk.sh

Adds LINES_PER_FILE to size each generated file, and CANDIDATES to compare
multiple branches against trunk in one hyperfine run. Worktrees are now
created with --detach so trunk can be benchmarked even when checked out
in the main worktree.
Adds --cache via CACHE_MODE=hot and a partial-cache mode that dirties
file1.php before each iteration so the modified-side cache misses while
the unmodified-side cache (keyed on git revision) still hits. Each
benchmark also clears the cache via hyperfine --setup so branches start
fresh.
@sirbrillig sirbrillig merged commit 8f11cc8 into trunk May 24, 2026
34 checks passed
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