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

![Performance Improvement with Partial Runs](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)

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.

## How to make partial runs?

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

* in addition to using [sharded benchmarks](https://codspeed.io/docs/features/sharded-benchmarks.md):
  * 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](https://codspeed.io/docs/features/understanding-the-metrics.md#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 CI runs, even if they ran different subsets of
benchmarks. Local runs and [CodSpeed Wizard](https://codspeed.io/docs/ai/wizard.md) runs hold only the
benchmarks they ran, so comparing them compares those benchmarks only.

## 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](https://codspeed.io/docs/features/archiving-benchmarks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.