Skip to main content

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:

  • pyodbc
  • azure-identity
  • databricks-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

query_performance_analyzer-0.1.0-py312-none-any.whl (11.6 kB view details)

Uploaded Python 3.12

File details

Details for the file query_performance_analyzer-0.1.0-py312-none-any.whl.

File metadata

File hashes

Hashes for query_performance_analyzer-0.1.0-py312-none-any.whl
Algorithm Hash digest
SHA256 62f7192165e56454252e2a734609f53acfa3ad54073105c12e43ce8030d14da8
MD5 efd546d4b6ddc8dbdda0637d0146c4fd
BLAKE2b-256 58b62a2dd395b6abbc3d4ae36dd6cc3890796cb2383a097c05ab80203db90a78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page