Add sqlclient-perf-pr pipeline comparing against main branch source - #4519
Open
cheenamalhotra wants to merge 1 commit into
Open
Add sqlclient-perf-pr pipeline comparing against main branch source#4519cheenamalhotra wants to merge 1 commit into
cheenamalhotra wants to merge 1 commit into
Conversation
Introduces eng/pipelines/perf/sqlclient-perf-pr-pipeline.yml, a PR-oriented variant of the perf pipeline. It extends the same Perf.Test.Job.yml template and exposes the same configuration options, but: * runs against the branch the run is queued on (manual/queue-time only), * uses the 'main' branch SOURCE as the baseline instead of a released package, * does not ingest results into Kusto (no ADX variable group, no translate/ publish/ingest steps). To support this, the on-VM run scripts gain a second baseline selector: * run-perf-tests.sh: --baseline-source-ref / --baseline-repo-url * run-perf-tests.ps1: -BaselineSourceRef / -BaselineRepoUrl The selector is mutually exclusive with the existing package baseline. The baseline ref is materialised outside the checkout (git worktree from the checkout's origin, falling back to a shallow clone) and that ref's own PerformanceTests project is built, so the measured driver is the baseline source. The comparison is labelled '<ref>@<sha>' so the exact baseline commit is recorded. README documents both pipelines, the source-baseline mechanism, the PR-only parameters, and new troubleshooting entries. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08b18803-3735-44b6-8afc-1996ef05fe15
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a PR-oriented performance pipeline that runs the existing SqlClient perf benchmark suite against the queued branch (“current”) and compares it to a source baseline from another ref in this repo (default main), without ingesting results into Kusto. This fits into the existing eng/pipelines/perf/ perf automation by reusing the same Perf Test Lab extends template and the same on-VM run scripts.
Changes:
- Introduces
sqlclient-perf-pr-pipeline.yml, a manual-only perf pipeline variant using source-baseline comparison and publishing artifacts/summaries only (no Kusto). - Extends the on-VM run scripts (
run-perf-tests.sh/.ps1) with a mutually-exclusive baseline selector that can materialize/build a baseline from another git ref’s source. - Updates perf pipeline documentation to describe the new PR pipeline and the new baseline-source mechanism.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/pipelines/perf/sqlclient-perf-pr-pipeline.yml | New manual-only PR perf pipeline wiring source-baseline parameters into the existing PerfTemplates job, omitting Kusto steps. |
| eng/pipelines/perf/scripts/run-perf-tests.sh | Adds --baseline-source-ref / --baseline-repo-url support and refactors baseline execution to allow package or source baselines. |
| eng/pipelines/perf/scripts/run-perf-tests.ps1 | Windows equivalent support for source-baseline acquisition (origin fetch/worktree + clone fallback) and baseline execution refactor. |
| eng/pipelines/perf/README.md | Documents the PR pipeline, source-baseline behavior, and troubleshooting updates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Introduces a PR-oriented variant of the perf pipeline:
eng/pipelines/perf/sqlclient-perf-pr-pipeline.yml.Pipeline in ADO: sqlclient-perf-pr
Purpose: To be used to run perf tests to capture benchmarks for PRs, personal braches, and publish comparison results locally against dotnet/sqlclient:main branch.
It extends the same
v1/Perf.Test.Job.yml@PerfTemplatestemplate and exposes the same configuration options assqlclient-perf-pipeline.yml(platform, framework, run mode, confirmation runs, regression threshold/gate, managed SNI, optimized async behaviour, connection pool V2), but:pr: none,trigger: none).mainbranch source code as the baseline instead of a released NuGet package.Source baseline mechanism
The perf template only exposes post-test steps, so both benchmark passes must happen inside the on-VM script. The run scripts therefore gain a second, mutually-exclusive baseline selector:
run-perf-tests.sh--baseline-source-ref,--baseline-repo-urlrun-perf-tests.ps1-BaselineSourceRef,-BaselineRepoUrlWhen a source ref is given, the script materialises that ref outside the checkout (so it can never be picked up by the candidate build or the results copy-back):
git fetch --no-tags --depth 1 origin '+refs/heads/<ref>:refs/remotes/perfbaseline/<ref>'+git worktree add --detach— uses the copied checkout's ownorigin.git clone --quiet --depth 1 --branch <ref> <baselineRepoUrl>when the tree arrived without.gitororiginneeds credentials the VM lacks.The baseline pass then builds that ref's own
PerformanceTestsproject, whose defaultProjectReferencepoints at that ref's driver source. This keepsinterleave_perf.py's--baseline-exe-dir/--current-exe-dircontract unchanged, and both passes still use the same injectedRUNNER_CONFIG/DATATYPES_CONFIGso configuration is identical on both sides.The comparison is labelled
<ref>@<sha>(e.g.main@9b20e5ec3) so each run records exactly which baseline commit it measured against.The existing package baseline (
--baseline-version->ReferenceType=Package+MdsPackageVersion) is unchanged; supplying both selectors fails fast.Verification
bash -nonrun-perf-tests.sh; PowerShell parser check onrun-perf-tests.ps1.gitbeing a file in a worktreedotnet buildof the perf project from a detached worktree into a separate output dir — 0 warnings, 0 errors, ~13sNotes for reviewers
eng/pipelines/perf/sqlclient-perf-pr-pipeline.yml..git-present path and the GitHub clone fallback.compare_perf.pyreports them asnew/removedrather than failing.Checklist
sqlclient-perfpipeline and its package-baseline path are unchangedeng/pipelines/perf/README.mdcovers both pipelines, the source-baseline mechanism, PR-only parameters, and new troubleshooting entries