FEAT: Refine Perf Benchmarking, test across different OSs and add it to CI#315
Merged
gargsaumya merged 11 commits intomainfrom Nov 6, 2025
Merged
FEAT: Refine Perf Benchmarking, test across different OSs and add it to CI#315gargsaumya merged 11 commits intomainfrom
gargsaumya merged 11 commits intomainfrom
Conversation
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.ddbc_bindings.cpp: 70.7%
mssql_python.pybind.connection.connection_pool.cpp: 78.9%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection.cpp: 81.2%
mssql_python.connection.py: 82.9%
mssql_python.cursor.py: 83.4%
mssql_python.auth.py: 87.1%
mssql_python.pooling.py: 87.7%
mssql_python.helpers.py: 88.9%
mssql_python.row.py: 90.9%🔗 Quick Links
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive performance benchmarking capabilities comparing mssql-python against pyodbc using real-world queries on the AdventureWorks2022 database. The benchmarking is integrated into the CI/CD pipeline to run automatically on both Windows (SQL Server 2022) and Ubuntu (containerized SQL Server 2022).
Key Changes:
- New
perf-benchmarking.pyscript with statistical analysis of query performance - Pipeline integration to download, restore, and benchmark against AdventureWorks2022
- ODBC Driver 18 installation automation for both Windows and Linux environments
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
eng/pipelines/pr-validation-pipeline.yml |
Adds three new pipeline steps: AdventureWorks2022 database restore (Windows), ODBC Driver 18 installation and benchmark execution (Windows), and Ubuntu container-based benchmarking with database restore and ODBC setup |
benchmarks/perf-benchmarking.py |
New standalone benchmarking script with statistical analysis comparing mssql-python vs pyodbc across complex queries, large datasets, and CTEs |
benchmarks/README.md |
Updated documentation describing both benchmark scripts, their usage, features, and requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
sumitmsft
approved these changes
Nov 6, 2025
gargsaumya
approved these changes
Nov 6, 2025
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.
Work Item / Issue Reference
Summary
This pull request introduces a comprehensive performance benchmarking workflow for comparing
mssql-pythonandpyodbcon 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:
benchmarks/perf-benchmarking.pyfor real-world query performance comparisons betweenmssql-pythonandpyodbc, including statistical analysis, speedup calculations, and detailed reporting.benchmarks/README.mdwith instructions and key features for running both the new and existing benchmark scripts, clarifying usage, output, and requirements.CI/CD pipeline automation:
eng/pipelines/pr-validation-pipeline.ymlto automatically download and restore the AdventureWorks2022 database for both Windows and Ubuntu environments, ensuring benchmarks run against a realistic dataset. [1] [2]These changes provide a robust framework for evaluating and monitoring database driver performance in CI, helping guide future optimizations and ensuring reliability across platforms.