Repository navigation
Conversation
Build one candidate-owned harness against both drivers and retain matched regression, baseline-debt and invalid-evidence outcomes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Sequential package comparisons in both scripts can reuse baseline binaries for the current pass, hiding candidate regressions, and the health build fails for the specified preview baseline because required dependency overrides are missing.
3 open issues
What changed in this PR
Adds a bounded OpenAsync health phase before BenchmarkDotNet in SqlClient’s existing performance runners, without changing production driver code or pipeline triggers. This is separate from the broader experiments in #5014.
Changes:
- Adds 20 workload cases with three paired repetitions, using the same harness against candidate and baseline drivers.
- Introduces matched regression gating, raw evidence, summaries, and optional Linux network-delay testing; default runs add no delay.
- Integrates both runners, increases timeout defaults, and adds tests and documentation.
| File | Description |
|---|---|
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj |
Links harness sources into modern .NET unit tests. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Measurements/ThreadPoolProbeRecorderTests.cs |
Tests bounded probe accounting. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Measurements/ThreadPoolHealthObserverTests.cs |
Tests observer failure and incomplete evidence. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Measurements/OpenAsyncHealthSettingsTests.cs |
Tests workload-setting validation. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Measurements/OpenAsyncHealthRecorderTests.cs |
Tests outcome retention and counter snapshots. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/OpenAsyncHealth/Program.cs |
Adds the standalone command-line entrypoint. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/OpenAsyncHealth/OpenAsyncHealth.csproj |
Supports source and package driver references. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj |
Excludes standalone harness sources from BenchmarkDotNet. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Measurements/ThreadPoolProbeRecorder.cs |
Records probe timing and missing callbacks. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Measurements/ThreadPoolHealthObserver.cs |
Samples scheduling and process resources. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Measurements/OpenAsyncHealthRecorder.cs |
Retains operation outcomes and counters. |
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Measurements/OpenAsyncHealthExperiment.cs |
Executes bounded connection workloads. |
eng/pipelines/perf/sqlclient-perf-pr-pipeline.yml |
Adds 30 minutes to the PR timeout default. |
eng/pipelines/perf/sqlclient-perf-pipeline.yml |
Adds 30 minutes to the standard timeout default. |
eng/pipelines/perf/sqlclient-perf-experiment.yml |
Adds 30 minutes to the experiment timeout default. |
eng/pipelines/perf/scripts/tests/test_openasync_health.py |
Tests evidence validation, comparisons, and orchestration. |
eng/pipelines/perf/scripts/tests/test_openasync_health_runners.py |
Tests both runner integrations and exit handling. |
eng/pipelines/perf/scripts/tests/test_openasync_health_process.py |
Adds opt-in executable lifecycle tests. |
eng/pipelines/perf/scripts/tests/test_openasync_health_netem.py |
Tests network-rule ownership and cleanup. |
eng/pipelines/perf/scripts/run-perf-tests.sh |
Runs health coverage before Linux benchmarks. |
eng/pipelines/perf/scripts/run-perf-tests.ps1 |
Runs health coverage before Windows benchmarks. |
eng/pipelines/perf/scripts/openasync_health.py |
Builds, pairs, validates, and reports health runs. |
eng/pipelines/perf/scripts/netem.py |
Adds optional SQL-only loopback delay. |
eng/pipelines/perf/README.md |
Documents automatic coverage and timeout changes. |
eng/pipelines/perf/openasync-health.md |
Explains workloads, gates, artifacts, and limitations. |
Review effort: Balanced
Observe marked BDN workloads in extra iterations, run burst regression cases automatically, and build matched candidate benchmark sources against source baselines. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new performance gates and BDN lifecycle changes need human review of authenticated SQL pipeline runs on Linux and Windows, since SQL-free checks do not establish end-to-end measurement validity for this revision.
2 resolved since last review
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5068 +/- ##
==========================================
+ Coverage 68.99% 70.55% +1.55%
==========================================
Files 314 315 +1
Lines 45857 70159 +24302
==========================================
+ Hits 31638 49499 +17861
- Misses 14219 20660 +6441
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Remove the standalone pre-benchmark sweep and network shaping. Record startup/warmup and extra-iteration queue/open/outcome signals in the perf tests, retaining missing work and resource evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The oversubscribed benchmark may never create pool waiters, leaving the advertised waiter-wakeup regression untested, and the PR description claims health checks and gates that are not implemented.
2 open issues
1 resolved since last review
Review effort: Balanced
Skip preview-only automatic JIT tier-promotion workload, retaining configured warmups and measurement counts. Reserve collection grace inside the pipeline task budget and retain partial per-unit logs and timings. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Host-wide Linux traffic shaping and BDN preview lifecycle changes need human validation of authenticated SQL/pipeline execution, timeout/cancellation, and owned-rule cleanup on the latest revision, since supplied Linux smoke evidence covers only TCP echo.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Privileged Linux traffic shaping and preview BenchmarkDotNet lifecycle changes require human review because the final revision lacks fresh authenticated SQL validation covering execution, cancellation, and cleanup on the actual perf host.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the pairing key treats the deliberately changed switch flag as a mismatch, leaving baseline and current rows unmatched with all performance deltas reported as N/A.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Privileged Linux network shaping and cross-runner lifecycle/cancellation changes require human validation, especially timeout cleanup and baseline/current execution, because the latest revision lacks fresh authenticated Linux SQL testing and shaping smoke checks used TCP echo instead.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Privileged Linux traffic shaping, cancellation cleanup, and preview BDN lifecycle changes require human validation because the latest revision lacks a fresh authenticated Linux SQL run.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Privileged Linux traffic shaping and cancellation cleanup depend on preview lifecycle hooks, and the latest revision lacks fresh authenticated Linux validation, requiring human review of runtime evidence.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Preview BDN lifecycle hooks and privileged Linux shaping require targeted human runtime validation because latest-revision authenticated Linux SQL execution and failure/cancellation cleanup remain unverified.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Preview BDN lifecycle/cancellation hooks and privileged Linux traffic-control rollback require human validation because current-revision authenticated Linux SQL and cancellation/cleanup evidence is missing.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The preview BDN lifecycle and privileged Linux network cleanup affect the shared perf flow, but the final revision lacks authenticated Linux SQL end-to-end validation of shaping, cancellation cleanup, and retained diagnostics.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Description
Capture async scheduler health inside the existing BenchmarkDotNet perf flow for four
OpenAsyncBurst.OpenQueryClosestates: Empty, Warm, Oversubscribed (16 pool slots), and NonPooled. There is no standalone sweep, production driver/API change, or new pipeline trigger. Existing benchmarks remain uninstrumented.OpenAsyncBurstconfig requests 100 ms of added SQL RTT. The harness applies the configured delay on Linux only; other platforms run unshaped. Health artifacts report requested and applied values separately. Runners that omitAdditionalRttMillisecondsrequest zero delay.runnerconfig.jsonccontrols the remaining settings. There is no separate preset or queue selector. Jobs supportPerRunnerisolation by default orPerCase; the burst runner usesPerCase. The standard config gives the burst runner a ten-minute case timeout. Configure the pool version separately.tcpermission. The helper adds 50 ms each way, refuses foreign queues, checks matched traffic and drops, and removes only its owned rules. Unsupported Linux shaping fails explicitly. BDN uses the in-process lifecycle hooks in the test-only preview package and skips extra JIT preparation without reducing configured iterations.See async-health.md for the protocol, configuration, and evidence limits. The benchmark uses fixed per-case work counts rather than a sampling profile. Driver UnitTests and its dependencies are unchanged. The perf harness is validated by running the benchmarks and generating the report.
Issues
Related to #5014. Its experiment branch remains unchanged.
Testing
On
507f17234, driver UnitTests built with no BenchmarkDotNet dependency, and the perf harness built and ran all four workloads against local Windows SQL. The report contained four rows backed by eight diagnostic windows.Earlier validation:
On
44691b1af8a09a9f05256858bb4a65beab79e716:dotnet artifacts\rtt-policy-current\PerformanceTests.dllanddotnet artifacts\rtt-policy-baseline\PerformanceTests.dllwithPERF_LIST_BENCHMARKS=json, also run under/opt/dotnet/dotnetin Ubuntu WSL: both builds selected 100 ms for Linux and 0 ms for Windows with both the stock template and an older config explicitly asking for 0. An unrelated runner retained its own setting.dotnet <current PerformanceTests.dll>from a fresh artifact directory withPERF_BENCHMARK=OpenAsyncBurstand a temporary integrated-auth SQL config explicitly asking for 100 ms: all four Windows BDN processes exited successfully and recorded zero applied delay.netem.py startandstopcommands passed using the RTT read from the compiled harness, on a loopback TCP echo target. Evidence showed 50 ms per direction and confirmed cleanup. This was not a new authenticated Linux SQL run.Earlier: 38 focused unit tests passed on
d6c8bfad. Perf run 193740 passed with all four workloads at 100 ms on an earlier revision. No fresh pipeline run was queued for the platform-policy change.Guidelines
Please review the contribution guidelines before submitting a pull request: