Commit d339f6d
FEAT: Refine Perf Benchmarking, test across different OSs and add it to CI (#315)
### Work Item / Issue Reference
<!--
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below (e.g.
AB#37452)
For external contributors: Insert Github Issue number below (e.g. #149)
Only one reference is required - either GitHub issue OR ADO Work Item.
-->
<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#40134](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/40134)
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request introduces a comprehensive performance benchmarking
workflow for comparing `mssql-python` and `pyodbc` on real-world SQL
Server workloads. The changes include a new benchmark script targeting
the AdventureWorks2022 database, enhancements to the documentation, and
updates to CI pipelines to automate database setup and benchmark
execution on both Windows and Ubuntu environments.
**Benchmarking infrastructure and documentation:**
* Added a new script `benchmarks/perf-benchmarking.py` for real-world
query performance comparisons between `mssql-python` and `pyodbc`,
including statistical analysis, speedup calculations, and detailed
reporting.
* Expanded the `benchmarks/README.md` with instructions and key features
for running both the new and existing benchmark scripts, clarifying
usage, output, and requirements.
**CI/CD pipeline automation:**
* Updated `eng/pipelines/pr-validation-pipeline.yml` to automatically
download and restore the AdventureWorks2022 database for both Windows
and Ubuntu environments, ensuring benchmarks run against a realistic
dataset.
[[1]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621R183-R230)
[[2]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621R550-R606)
* Integrated steps in the pipeline to install required dependencies and
execute the new benchmarking script, with conditional logic for platform
and SQL Server availability.
[[1]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621R183-R230)
[[2]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621R550-R606)
These changes provide a robust framework for evaluating and monitoring
database driver performance in CI, helping guide future optimizations
and ensuring reliability across platforms.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 9d385d3 commit d339f6d
File tree
3 files changed
+638
-11
lines changed- benchmarks
- eng/pipelines
3 files changed
+638
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
14 | | - | |
15 | | - | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | | - | |
26 | | - | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
30 | 72 | | |
31 | 73 | | |
32 | 74 | | |
33 | 75 | | |
34 | 76 | | |
35 | 77 | | |
36 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
37 | 86 | | |
38 | 87 | | |
39 | | - | |
40 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
0 commit comments