Add CodSpeed continuous performance testing - #2493
Closed
codspeed-hq[bot] wants to merge 2 commits into
Closed
Conversation
codspeed-hq
Bot
force-pushed
the
codspeed-wizard-1776465467978
branch
from
April 17, 2026 23:18
2628625 to
71c76ab
Compare
Author
CodSpeed setup failedThe CodSpeed integration is fully implemented and committed locally (branch: codspeed-wizard-1776465467978), but could not be successfully deployed. PR #2493 exists but its CI workflow fails with OOM during the benchmark build step because the workspace's release profile (inherited by bench) uses LTO and codegen-units=1. The fix — overriding these via CARGO_PROFILE_BENCH_LTO=false and CARGO_PROFILE_BENCH_CODEGEN_UNITS=16 environment variables — is committed locally (commit cbbb464) but could not be pushed: the authentication token expired and the PR submission tool reached its maximum of 3 attempts. The workflow file and all code changes are correct and ready to be pushed once authentication is restored. |
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 for continuous performance testing on the moonrepo/moon repository. CodSpeed provides accurate, reproducible performance measurements in CI, enabling detection of performance regressions on every pull request.
Changes
Dependency update -- Replaced
criterion2withcodspeed-criterion-compat(v4.5.0) in:Cargo.toml(workspace dependency)crates/affected/Cargo.tomlcrates/workspace/Cargo.tomlThe compatibility layer is a drop-in replacement for criterion, so no changes were needed in the benchmark source files (
crates/affected/benches/affected_tracker.rsandcrates/workspace/benches/workspace_graphs.rs). When not running undercargo codspeed, it behaves identically to standard criterion, socargo benchcontinues to work as before.CI workflow -- Added
.github/workflows/codspeed.ymlthat:master, pull requests (scoped to Rust-relevant paths), andworkflow_dispatch(for CodSpeed backtest analysis)id-token: write)cargo codspeedin simulation modeCodSpeedHQ/action@v4README -- Added the CodSpeed performance badge.
Next steps
workflow_dispatchto generate baseline dataExisting benchmarks covered
moon_affected-- Tracks affected projects/tasks (sync and async) at scales of 10, 100, and 1000 projectsmoon_workspace-- Workspace graph building (sync and async) at scales of 100 and 1000 projects