A library with the Lakehouse Framework
Project description
Query Load testing
This project is a benchmarking tool that compares query performance across different SQL Warehousing solutions.
Current support out of the box for:
- Synapse Serverless
- Databricks SQL Warehousing
It supports concurrent and sequential execution modes to evaluate performance, caching effects, and scalability.
📂 Project Structure
.
├── run.py # Main script to run benchmarks
├── config.py # Configuration file (credentials, queries, concurrency settings)
├── requirements.txt # Python dependencies (not provided, create manually)
└── README.md # Documentation
⚙️ Setup
1. Clone the repository
git clone <repo-url>
cd <repo-folder>
2. Install dependencies
pip install -r requirements.txt
Dependencies include:
pyodbcazure-identitydatabricks-sql-connector
3. Configure config.py
The project now uses a structured configuration format with backward compatibility:
New Structured Format (Recommended):
CONFIG = {
"CONNECTIONS": {
"Synapse": {
"SYNAPSE_SERVER": "your-synapse-server",
"SYNAPSE_DATABASE": "your-db",
"SOURCE": "Synapse"
},
"Databricks": {
"DATABRICKS_TOKEN": "your-token",
"DATABRICKS_SERVER": "your-databricks-server",
"DATABRICKS_HTTP_PATH": "your-http-path",
"SOURCE": "Databricks"
}
},
"QUERIES": {
"External": ["SELECT ...", ...],
"Managed": ["SELECT ...", ...],
"Synapse": ["SELECT ...", ...]
},
"EXPERIMENTS": {
"ConcurrentComparison": {
"CONNECTIONS": ["Databricks", "Synapse"],
"QUERY_PLANS": ["External", "Managed", "Synapse"],
"CONCURRENCY_LEVEL": 8,
"RUN_SEQUENTIAL": True
}
}
}
▶️ Running the Benchmark
Use the new structured runner for custom experiments:
import runner
from config import CONFIG
# Run a custom experiment
results = runner.run_experiment("Experiment1", CONFIG)
# Or run queries directly
queries = CONFIG["QUERIES"]["External"]
connection_config = CONFIG["CONNECTIONS"]["Databricks"]
results = runner.run_threading_queries(
queries=queries,
parallel_runs=4,
sequential_runs_per_query=2,
source="Databricks",
config=connection_config,
experiment="MyTest"
)
✅ Use Cases
- Performance benchmarking between Databricks and Synapse
- Identifying query latency differences
📝 Notes
- Requires Azure credentials (
DefaultAzureCredential) for Synapse authentication - Requires Databricks ODBC driver
- Make sure queries are aligned:
len(DATABRICKS_QUERIES_EXTERNAL) == len(DATABRICKS_QUERIES_MANAGED) == len(SYNAPSE_QUERIES)
Improvements
- Create Warehouse
- Create APP
- Command line support
- non PY config
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file query_performance_analyzer-0.1.0-py312-none-any.whl.
File metadata
- Download URL: query_performance_analyzer-0.1.0-py312-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3.12
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62f7192165e56454252e2a734609f53acfa3ad54073105c12e43ce8030d14da8
|
|
| MD5 |
efd546d4b6ddc8dbdda0637d0146c4fd
|
|
| BLAKE2b-256 |
58b62a2dd395b6abbc3d4ae36dd6cc3890796cb2383a097c05ab80203db90a78
|