Add CodSpeed continuous performance testing#2919
Open
codspeed-hq[bot] wants to merge 2 commits into
Open
Conversation
Author
Contributor
|
@copilot fix linting by running "pre-commit run -a" |
Agent-Logs-Url: https://github.com/xtensor-stack/xtensor/sessions/56d2451c-ecd1-4214-8576-e1961071a7af Co-authored-by: Alex-PLACET <2400067+Alex-PLACET@users.noreply.github.com>
Done in commit |
Alex-PLACET
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates CodSpeed for continuous performance monitoring of xtensor's existing benchmark suite.
What changed
benchmark/CMakeLists.txt-- The Google Benchmark dependency is replaced with CodSpeed's compatibility layer, which wraps Google Benchmark with CodSpeed instrumentation. WhenCODSPEED_MODEis not set (or set tooff), the build behaves identically to upstream Google Benchmark. Two additional changes are made for CodSpeed compatibility:-march=nativeis conditionally skipped in simulation mode, since valgrind does not support all native instruction sets.RelWithDebInfo(instead ofRelease) when CodSpeed is active, to include debug symbols for flame graph profiling..github/workflows/codspeed.yml-- A new GitHub Actions workflow that builds and runs the full benchmark suite (160+ benchmarks) under CodSpeed's CPU simulation instrument on every push tomasterand on pull requests. The workflow uses OIDC authentication and follows the same dependency setup (micromamba, xsimd) as the existingbenchmarks.yml.README.md-- Added the CodSpeed badge.How it works
CodSpeed's simulation mode runs each benchmark once through a CPU instruction counter (valgrind-based), producing deterministic measurements that are independent of CI environment load. This makes performance regressions detectable on standard
ubuntu-latestrunners without dedicated hardware.Next steps
masterbranch.