Skip to content

feat(scripts): bench-ab.sh — one-command local perf A/B#654

Merged
justrach merged 1 commit into
release/0.2.5828from
feat/bench-ab-script
Jul 4, 2026
Merged

feat(scripts): bench-ab.sh — one-command local perf A/B#654
justrach merged 1 commit into
release/0.2.5828from
feat/bench-ab-script

Conversation

@justrach

@justrach justrach commented Jul 4, 2026

Copy link
Copy Markdown
Owner

The "way to compare" for perf work: scripts/bench-ab.sh [base-ref] builds the base in a throwaway $HOME worktree, benches base and the current working tree back-to-back on the same machine, and prints the exact CI regression table (compare-bench.py, 10% + 50µs thresholds). Default base is HEAD, so measuring uncommitted work is one command. Same-machine-same-run only — the header says so, because cross-day/cross-box JSON comparisons mislead (we hit exactly that this cycle).

🤖 Generated with Claude Code

Wraps the recipe used for every perf PR this cycle: build the base ref
in a throwaway $HOME worktree (tests/bench misbehave under /tmp roots),
run `zig build bench -- --json` for base and working tree back-to-back
on the same machine, and print the same compare-bench.py table CI posts
on PRs. Defaults to base=HEAD so uncommitted perf work is one command
away from a trustworthy same-machine delta.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Benchmark Regression Report

Thresholds: 10.00% and 50,000 ns absolute delta

NOISE means the percentage threshold was exceeded, but the absolute delta was too small to fail CI.

Tool Base (ns) Head (ns) Delta Abs Delta (ns) Status
codedb_bundle 96354 97964 +1.67% +1610 OK
codedb_changes 11592 10752 -7.25% -840 OK
codedb_context 291984 291109 -0.30% -875 OK
codedb_deps 331 326 -1.51% -5 OK
codedb_edit 43748 38662 -11.63% -5086 OK
codedb_find 2634 2698 +2.43% +64 OK
codedb_hot 24961 24801 -0.64% -160 OK
codedb_outline 17110 16135 -5.70% -975 OK
codedb_read 14064 12944 -7.96% -1120 OK
codedb_search 87333 89008 +1.92% +1675 OK
codedb_snapshot 72665 68073 -6.32% -4592 OK
codedb_status 10441 10182 -2.48% -259 OK
codedb_symbol 61276 55096 -10.09% -6180 OK
codedb_tree 13791 13937 +1.06% +146 OK
codedb_word 11724 12599 +7.46% +875 OK

@justrach justrach merged commit c1ed02f into release/0.2.5828 Jul 4, 2026
2 checks passed
justrach added a commit that referenced this pull request Jul 5, 2026
Bump semver + npm to 0.2.5828 and round out the changelog entry with
the six commits that landed after the draft was written: searchSymbols
binary-insert + total-order tiebreak (#647, #649), word-index persist
integer remap + chunked writes (#650), call-graph reverse adjacency
precompute (#651), snapshot dual-write clone (#652), ranked-search
line-offset resolution (#653), and scripts/bench-ab.sh (#654). No code
changes beyond the version strings + CHANGELOG.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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