Learn how to leverage partial benchmark runs in CodSpeed to only run relevant benchmarks
With your projects becoming larger, you might end up with long-running benchmark
workflows, degrading the performance feedback loop and using a lot of resources
in your CI.As a solution to these problems, when doing a CI run, you can run only a subset
of the benchmarks that are defined in your codebase. For example:
only run benchmarks relevant to the code changes in a pull request
run a subset of long-running benchmarks on a schedule
Partial runs allows you to run incomplete benchmark suites while
still receiving performance reports containing all the benchmarks of your
repository. This allow you to reduce CI execution time by only running
benchmarks relevant to your code changes, while still maintaining a complete
performance history.
Only Suite B was run since it was the only one affected by the code changes
When benchmarks are missing from a run, CodSpeed automatically uses baseline
results from previous runs to fill the gaps.
When CodSpeed detects missing benchmarks in a run, it automatically:
Identifies missing benchmarks by comparing the current run with its
baseline
run
Retrieves baseline results from the baseline run
Displays them as “skipped” with in reports
You will thus be able to track the complete performance history of your
benchmarks and compare any two runs, even if they ran different subsets of
benchmarks.
When removing benchmarks from your codebase, they will first appear as “skipped”
in reports. To remove them from future reports, use the benchmark archival
feature.