Skip to content

Setup CodSpeed for continuous benchmarking#85

Closed
codspeed-hq[bot] wants to merge 4 commits intomainfrom
setup-codspeed-1770038502668
Closed

Setup CodSpeed for continuous benchmarking#85
codspeed-hq[bot] wants to merge 4 commits intomainfrom
setup-codspeed-1770038502668

Conversation

@codspeed-hq
Copy link

@codspeed-hq codspeed-hq bot commented Feb 2, 2026

Summary

This PR sets up CodSpeed for continuous performance monitoring on the pyhdb-rs repository:

  • Replaced criterion with codspeed-criterion-compat v4.3.0 as a drop-in replacement
  • Created .github/workflows/codspeed.yml for automated benchmark execution
  • Added CodSpeed badge to README.md
  • Fixed test compilation by feature-gating tests that require the test-utils feature
  • Excluded Python benchmarks (hdbconnect-py) from the CodSpeed workflow to avoid linker issues

CodSpeed Integration

CodSpeed provides accurate, reproducible performance measurements in CI by using specialized instrumentation that eliminates environmental noise. The integration uses:

  • Mode: Simulation (for consistent, hardware-agnostic measurements)
  • Authentication: OIDC-based (secure, no token needed)
  • Benchmark Framework: criterion (via codspeed-criterion-compat)
  • Scope: Rust benchmarks only (hdbconnect-arrow and hdbconnect-mcp)

Changes

  1. Cargo.toml: Updated criterion dependency to use codspeed-criterion-compat
  2. Cargo.lock: Updated lockfile with CodSpeed dependencies
  3. README.md: Added CodSpeed badge
  4. .github/workflows/codspeed.yml: New workflow for running benchmarks (excludes Python crate)
  5. processor.rs: Added #[cfg(feature = "test-utils")] to tests using decimal_str()

Fixes

  • Test Compilation: Added feature gates to tests that use methods requiring test-utils feature
  • Linker Issues: Excluded hdbconnect-py crate which has Python runtime dependencies incompatible with CodSpeed's static build approach

Test Plan

  • Verify benchmarks compile successfully with cargo codspeed build --workspace --exclude hdbconnect-py
  • Verify benchmarks run with cargo codspeed run --workspace --exclude hdbconnect-py
  • Verify CI workflow completes successfully
  • Check that CodSpeed reports are generated and accessible

Next Steps

Once this PR is merged:

  1. CodSpeed will automatically track performance on every commit to main
  2. Pull requests will receive performance comparison reports
  3. Visit https://codspeed.io/bug-ops/pyhdb-rs to view detailed performance trends

@github-actions github-actions bot added size/L documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file rust Pull requests that update rust code arrow ci and removed size/L labels Feb 2, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage   84.09%   84.09%           
=======================================
  Files          63       63           
  Lines       12618    12618           
=======================================
  Hits        10611    10611           
  Misses       2007     2007           
Flag Coverage Δ
hdbconnect-arrow 84.03% <ø> (ø)
hdbconnect-mcp 84.03% <ø> (ø)
python 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rates/hdbconnect-arrow/src/conversion/processor.rs 97.49% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added size/XS and removed dependencies Pull requests that update a dependency file labels Feb 2, 2026
@codspeed-hq
Copy link
Author

codspeed-hq bot commented Feb 2, 2026

Merging this PR will improve performance by 10.75%

⚡ 1 improved benchmark
✅ 136 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
get_no_ttl_check 6.6 µs 6 µs +10.75%

Comparing setup-codspeed-1770038502668 (ddbfe5b) with main (56cc23d)

Open in CodSpeed

@bug-ops bug-ops closed this Feb 2, 2026
@bug-ops bug-ops deleted the setup-codspeed-1770038502668 branch February 2, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow ci documentation Improvements or additions to documentation rust Pull requests that update rust code size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants