Skip to content

Add CodSpeed continuous performance testing integration#1

Draft
avalanche-staging[bot] wants to merge 6 commits intomainfrom
setup-codspeed-1769451232997
Draft

Add CodSpeed continuous performance testing integration#1
avalanche-staging[bot] wants to merge 6 commits intomainfrom
setup-codspeed-1769451232997

Conversation

@avalanche-staging
Copy link

Summary

This PR integrates CodSpeed for continuous performance testing of the scipp C++ codebase. CodSpeed provides accurate, reproducible performance measurements in CI environments using specialized instrumentation to isolate performance from environmental noise.

Changes Made

  • CMake Integration: Modified lib/CMakeLists.txt to use CodSpeed's google_benchmark compatibility layer via FetchContent when CODSPEED_MODE is set
  • CI Workflow: Created .github/workflows/codspeed.yml to run benchmarks on push to main, pull requests, and manual triggers
  • Documentation: Added CodSpeed badge to README.md linking to the project's performance dashboard

Technical Details

  • Uses CodSpeed's simulation mode for consistent, hardware-agnostic measurements
  • Leverages existing Google Benchmark infrastructure with zero code changes to benchmark files
  • Authenticates via OIDC (OpenID Connect) for secure, token-free uploads
  • Builds all benchmarks using the existing all-benchmarks CMake target
  • Runs on Ubuntu 24.04 with the same conda environment as the main CI

Next Steps

Once this PR is merged, you'll be able to:

  • View performance trends over time on the CodSpeed dashboard
  • Receive automated performance regression detection on pull requests
  • See detailed flame graphs and execution profiles for benchmarks

The first workflow run will establish baseline performance metrics for future comparisons.

- Integrated CodSpeed google_benchmark compatibility layer in CMakeLists.txt
- Created GitHub Actions workflow for continuous performance testing
- Added CodSpeed badge to README.md
- Configured benchmarks to run with simulation mode for consistent results
Add BENCHMARK_ENABLE_TESTING and BENCHMARK_ENABLE_GTEST_TESTS flags
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.

0 participants