> ## Documentation Index
> Fetch the complete documentation index at: https://codspeed.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Partial Runs

> 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.

<Frame caption="Only Suite B was run since it was the only one affected by the code changes">
  <img src="https://mintcdn.com/codspeed/ZnsGrugi_Ka-FYRx/assets/partial-runs-speedup.excalidraw.png?fit=max&auto=format&n=ZnsGrugi_Ka-FYRx&q=85&s=787c723f22180658b20f2318b4923c47" alt="Performance Improvement with Partial Runs" className="p-4 w-full max-w-lg mx-auto" width="1919" height="646" data-path="assets/partial-runs-speedup.excalidraw.png" />
</Frame>

When benchmarks are missing from a run, CodSpeed automatically uses **baseline
results** from previous runs to fill the gaps.

## How to make partial runs?

There are several ways to implement partial runs in your CI workflow:

* in addition to using [sharded benchmarks](/features/sharded-benchmarks):
  * use your benchmarking framework's "affected" or "changed" feature if it
    exists
  * detect which package/library of your monorepo was affected by the code
    changes and run only its benchmarks
* run a long-running benchmark suite on a schedule (e.g. nightly) in addition to
  running a smaller suite on each pull request

## Skipped Benchmarks

When CodSpeed detects missing benchmarks in a run, it automatically:

1. **Identifies missing benchmarks** by comparing the current run with its
   [baseline run](/features/understanding-the-metrics/#baseline-report-selection)
2. **Retrieves baseline results** from the baseline run
3. **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.

## Managing Removed 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](/features/archiving-benchmarks).
