Skip to content

impl(bq_driver): Adding performance pipeline for linux - #1638

Merged
sachinpro merged 6 commits into
mainfrom
linux_perf_check
Oct 31, 2026
Merged

sachinpro merged 6 commits into
mainfrom
linux_perf_check

Conversation

@KanchanShu

@KanchanShu KanchanShu commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR add Linux ODBC Performance Benchmark Pipeline

Summary

Adds a dedicated Linux performance benchmark pipeline for the BigQuery ODBC driver.

Changes

  • Builds and runs performance_test using CMake.
  • Benchmarks the Existing, Current, and Main Google ODBC drivers.
  • Runs each benchmark multiple times and uses the median execution time.
  • Adds benchmark_results.py to parse results and generate a comparison table with performance percentage changes.
  • Downloads driver artifacts and uploads benchmark results to GCS.
  • Adds a Cloud Build configuration to run the benchmark pipeline on main.

Result

Provides automated Linux performance comparison between the existing driver, current branch, and main to identify performance improvements or regressions.

Benchmark Results: Linux Performance Benchmark Results

@KanchanShu
KanchanShu force-pushed the linux_perf_check branch 3 times, most recently from e5a1626 to 06bff4f Compare August 26, 2026 12:19
@shivamd-gpartner
shivamd-gpartner marked this pull request as ready for review August 26, 2026 13:59
@shivamd-gpartner
shivamd-gpartner requested a review from a team as a code owner August 26, 2026 13:59
@shivamd-gpartner

Copy link
Copy Markdown
Contributor

new_timestamp_table test case seems failing on our driver @KanchanShu can you see that

@@ -0,0 +1,29 @@
# Copyright 2025 Google LLC

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please make it 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# This is the name of DSN set in odbc.ini.
mapfile -t cmake_args < <(cmake::common_args)

GOOGLE_ODBCINI="/opt/odbc-driver/odbc.ini"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems duplicate declaration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it

@shivamd-gpartner

Copy link
Copy Markdown
Contributor

@sachinpro this is pending your review, please take a look

@sachinpro

Copy link
Copy Markdown
Collaborator

/gcbrun

@sachinpro

Copy link
Copy Markdown
Collaborator

/gcbrun

1 similar comment
@sachinpro

Copy link
Copy Markdown
Collaborator

/gcbrun

@sachinpro

Copy link
Copy Markdown
Collaborator

/gcbrun

@sachinpro

Copy link
Copy Markdown
Collaborator

/gcbrun

@sachinpro

Copy link
Copy Markdown
Collaborator

Few changes to the original PR

  1. Split Linux Benchmarks into 3 Separate Cloud Build Triggers (Matching Windows Setup):

    • Google Driver Benchmark (linux-bq-driver-benchmark-ci / ci/cloudbuild/builds/linux-bq-driver-benchmark.sh):
      • Downloads gs://odbc-integration-builds/<SANITIZED_BRANCH>/libgoogle_cloud_odbc_bq_driver.so, runs the benchmark suite (BQ_DRIVER_INTEGRATION_TESTS=ON), and uploads performance_benchmark_results_BqDriver.txt to gs://bq-dev-tools-testing-drivers/odbc-perf/<SANITIZED_BRANCH>/linux_results/.
      • On main, it is triggered automatically by ci/cloudbuild/builds/integration-production-bq-driver-dm.sh right after libgoogle_cloud_odbc_bq_driver.so is uploaded to GCS (preventing the race condition where the benchmark previously started before the .so build finished). On other branches, it is run manually.
    • Existing Driver Benchmark (linux-existing-driver-benchmark-ci / ci/cloudbuild/builds/linux-existing-driver-benchmark.sh):
      • Manual trigger only (BUILD_SHARD="Core"). Runs the benchmark suite against the Existing (Simba) driver (BQ_DRIVER_INTEGRATION_TESTS=OFF) and uploads performance_benchmark_results_Core.txt to gs://bq-dev-tools-testing-drivers/odbc-perf/<SANITIZED_BRANCH>/linux_results/.
    • Benchmark Results Table Generator (linux-benchmark-results-ci / ci/cloudbuild/builds/linux-benchmark-results.sh):
      • Automatically triggered at the end of either linux-bq-driver-benchmark-ci or linux-existing-driver-benchmark-ci (and can also be run manually).
      • Avoids re-running main benchmarks on every run; instead downloads performance_benchmark_results_BqDriver.txt (current branch), performance_benchmark_results_Core.txt (current branch), and main/linux_results/performance_benchmark_results_BqDriver.txt from GCS, generates benchmark_summary_table.txt, and uploads it to gs://bq-dev-tools-testing-drivers/odbc-perf/<SANITIZED_BRANCH>/linux_results/benchmark_summary_table.txt.
  2. Aligned GCS Artifact & Result Paths with Windows:

    • Driver builds (gs://odbc-integration-builds): Updated ci/cloudbuild/builds/integration-production-bq-driver-dm.sh and ci/cloudbuild/builds/linux-bq-driver-benchmark.sh to upload and fetch the Linux driver .so at gs://odbc-integration-builds/<SANITIZED_BRANCH>/libgoogle_cloud_odbc_bq_driver.so using the same branch sanitization (sed -E 's/[^a-zA-Z0-9-]/_/g') as Windows MSI builds.
    • Benchmark results (gs://bq-dev-tools-testing-drivers): Standardized Linux result filenames (performance_benchmark_results_BqDriver.txt, performance_benchmark_results_Core.txt, benchmark_summary_table.txt) under gs://bq-dev-tools-testing-drivers/odbc-perf/<SANITIZED_BRANCH>/linux_results/.
  3. Shared benchmark_results.py Between Linux and Windows & Added Commit SHA:

    • Updated ci/cloudbuild/builds/lib/benchmark_results.py to:
      • Parse [ METRIC ] lines (Time to first byte, Iteration time) and normalize [ OK ] lines for DataFetchPerformanceParamTest to <base_name> - Total execution time.
      • Group and sort data-fetch tests by (table_name, 10k -> 100k -> 1M, metric_order) ahead of catalog tests.
      • Include Commit ID: \<commit_sha>`at the top ofbenchmark_summary_table.txt (--commit-sha`).
      • Gracefully handle missing or partial input files by warning and displaying N/A instead of raising FileNotFoundError, ensuring failures in any test or shard do not block summary generation.
    • Replaced the inline Python parser in .github/workflows/test-runner.yml (windows-benchmark-results) with a direct call to ci/cloudbuild/builds/lib/benchmark_results.py.

@sachinpro sachinpro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I made changes to make the pipeline more consistent with the existing windows benchmarks. We are utilizing the same benchmark_results.py now for windows and linux.

I also split the benchmark for Google and existing driver, so they can be run independently(and parallelly).

@sachinpro
sachinpro merged commit 908534a into main Oct 31, 2026
10 of 24 checks passed
@sachinpro
sachinpro deleted the linux_perf_check branch October 31, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants