Add CodSpeed integration for continuous performance testing#1
Draft
codspeed-hq[bot] wants to merge 17 commits intomainfrom
Draft
Add CodSpeed integration for continuous performance testing#1codspeed-hq[bot] wants to merge 17 commits intomainfrom
codspeed-hq[bot] wants to merge 17 commits intomainfrom
Conversation
This commit integrates CodSpeed to enable continuous performance testing: - Added pytest-codspeed to test dependencies (pyproject.toml, requirements/test.in, requirements/test.txt) - Created pytest-codspeed compatible benchmarks in bench/ directory: - test_variable_bench.py: Variable operations and numpy assignment benchmarks - test_bin_bench.py: Binning and grouping operation benchmarks - test_binned_bench.py: Binned data operations and lookup benchmarks - Added GitHub Actions workflow (.github/workflows/codspeed.yml) with: - OIDC authentication for secure run submission - Simulation mode for consistent performance measurements - Integration with existing build process using cmake and conda - Added CodSpeed badge to README.md linking to project dashboard The benchmarks were converted from the existing ASV benchmarks while maintaining the same functionality and coverage. CodSpeed will provide reproducible performance measurements in CI without environmental noise.
Set CONDA_FORGE_BUILD and GIT_VERSION_INFO environment variables to provide a fallback version for CMake builds when git tags are not available.
CMake needs CONDA_FORGE_BUILD as a cache variable (-D flag) rather than an environment variable to properly detect and use the GIT_VERSION_INFO environment variable for version detection.
Changed GIT_VERSION_INFO from '0.0.0.dev0' to '0.0.0' as CMake's project() VERSION only accepts numeric version components.
Changed the shell used in the workflow from bash to micromamba-shell.
Updated shell configuration and benchmark run command to use micromamba activation.
Updated the build step for scipp to include dependency setup and installation of test dependencies.
Removed GIT_VERSION_INFO environment variable.
Comment out the OptimizeWarning suppression in pyproject.toml.
Author
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
Removed the tox command from the CI workflow.
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.
Summary
This PR integrates CodSpeed to enable continuous performance testing in CI, providing reproducible performance measurements without environmental noise.
Changes Made
pytest-codspeedto test dependencies inpyproject.tomland requirements filesbench/directory:test_variable_bench.py: Variable operations (copy, arithmetic) and numpy assignment benchmarkstest_bin_bench.py: Binning and grouping operation benchmarks with various parameter combinationstest_binned_bench.py: Binned data operations (constituents, size, sum, mean, concat) and lookup benchmarks.github/workflows/codspeed.ymlwith:Benchmark Coverage
The new benchmarks maintain the same coverage as the existing ASV benchmarks while being compatible with pytest-codspeed:
Why CodSpeed?
CodSpeed provides several advantages over traditional benchmarking:
Test Plan