perf(ci): A/B comparison script, perf workflow, step-summary throughput - #47
Merged
Merged
Conversation
Add benchmarks/compare.ps1, which builds Qvec.Benchmarks at two commits in throw-away worktrees and runs them interleaved on the same dataset, reporting head/base ratios as paired medians with the per-round spread and recall next to every number. Add .github/workflows/perf.yml (dispatch with base/head/rounds, weekly master vs latest tag) that runs the search micro-benchmarks and the A/B script into the step summary without ever failing the build. InsertThroughputTests appends its measured value to GITHUB_STEP_SUMMARY so passing runs leave a trace. Validated by re-measuring PR 3 (e8ebef2 -> 607dda6) on siftsmall: QPS 1.87-2.33x single-threaded with recall unchanged, build unchanged. Recorded in docs/design-performance.md sections 2.1, 3.3, 3.4, 5. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 2 of the performance programme (
docs/design-performance.md§3.3–3.4): tracking tooling. No library code changes.Changes
benchmarks/compare.ps1— builds base and head in throw-away git worktrees, runs them alternating onsiftsmall(configurable), parses each run's--outMarkdown (works against any past commit), forces invariant globalization, reports head/base as median over paired rounds + per-round spread, recall next to every row..github/workflows/perf.yml—workflow_dispatch(base/head/rounds) + weekly schedule (master vs latestv*tag). RunsSearchBenchmarks(--job short) and the A/B script, writes both to the step summary, uploads artifacts. Every measuring step iscontinue-on-error: it never fails the build.InsertThroughputTests— appends the measured inserts/s to$GITHUB_STEP_SUMMARYwhen set; comment now says it is a smoke floor and points to the perf workflow.design-performance.md§2.1 (macro confirmation table), §3.3/§3.4 marked done, §5;benchmarks/README.mdnew "A/B comparison" section.Validation of the tool itself
Re-measured PR #46 with it on the reference machine (siftsmall, 3 rounds, 10 passes):
dotnet build Qvec.slnx -c Release: 0 warnings;InsertThroughputTestsverified to write the summary line.workflow_dispatchafter merge (siftsmall is an FTP download; the macro step is skipped with a note if the runner cannot reach it).