Skip to content

perf(ci): A/B comparison script, perf workflow, step-summary throughput - #47

Merged
matengo merged 1 commit into
masterfrom
perf-workflow
Sep 18, 2026
Merged

matengo merged 1 commit into
masterfrom
perf-workflow

Conversation

@matengo

@matengo matengo commented Sep 18, 2026

Copy link
Copy Markdown
Owner

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 on siftsmall (configurable), parses each run's --out Markdown (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.ymlworkflow_dispatch (base/head/rounds) + weekly schedule (master vs latest v* tag). Runs SearchBenchmarks (--job short) and the A/B script, writes both to the step summary, uploads artifacts. Every measuring step is continue-on-error: it never fails the build.
  • InsertThroughputTests — appends the measured inserts/s to $GITHUB_STEP_SUMMARY when set; comment now says it is a smoke floor and points to the perf workflow.
  • Docs: design-performance.md §2.1 (macro confirmation table), §3.3/§3.4 marked done, §5; benchmarks/README.md new "A/B comparison" section.

Validation of the tool itself

Re-measured PR #46 with it on the reference machine (siftsmall, 3 rounds, 10 passes):

metric 1 thread head/base 12 threads head/base
build inserts/s 1.06× (0.99–1.19) 1.02×
QPS @ ef 10 1.87× (1.75–1.94) too short to trust
QPS @ ef 40 1.89× (1.78–1.90) too short to trust
QPS @ ef 160 2.33× (2.28–2.77) 2.06× (1.59–2.30)
recall@10 unchanged unchanged
  • dotnet build Qvec.slnx -c Release: 0 warnings; InsertThroughputTests verified to write the summary line.
  • The workflow itself will be exercised via workflow_dispatch after merge (siftsmall is an FTP download; the macro step is skipped with a note if the runner cannot reach it).

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>
@matengo
matengo merged commit cabcfc9 into master Sep 18, 2026
2 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