https://github.com/codspeedhq/runner
CodSpeed runner, gathering performance data from CI environments
https://github.com/codspeedhq/runner
benchmark github-actions
Last synced: 7 days ago
JSON representation
CodSpeed runner, gathering performance data from CI environments
- Host: GitHub
- URL: https://github.com/codspeedhq/runner
- Owner: CodSpeedHQ
- License: apache-2.0
- Created: 2023-11-11T18:35:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T14:44:35.000Z (10 months ago)
- Last Synced: 2025-04-01T15:43:09.883Z (10 months ago)
- Topics: benchmark, github-actions
- Language: Rust
- Homepage: https://codspeed.io
- Size: 598 KB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
CodSpeed CLI
CLI to gather performance data and upload performance reports to [CodSpeed](https://codspeed.io)
[](https://github.com/CodSpeedHQ/runner/actions/workflows/ci.yml)
[](https://discord.com/invite/MxpaCfKSqF)
[](https://codspeed.io/)
The `codspeed` CLI is designed to be used both in **local** in **CI environments**.
The following CI providers are supported:
- [GitHub Actions](https://docs.codspeed.io/integrations/ci/github-actions): Usage with [`@CodSpeedHQ/action`](https://github.com/CodSpeedHQ/action) is recommended.
- [GitLab CI](https://docs.codspeed.io/integrations/ci/gitlab-ci)
- [Buildkite](https://docs.codspeed.io/integrations/ci/buildkite)
#### Other providers
If you want to use the CLI with another provider, you can open an issue or chat with us on [Discord](https://discord.com/invite/MxpaCfKSqF) 🚀
You can check out the implementation of the [supported providers](https://github.com/CodSpeedHQ/runner/tree/main/src/run/run_environment) for reference.
## Installation
```bash
curl -fsSL https://github.com/CodSpeedHQ/runner/releases/latest/download/codspeed-runner-installer.sh | bash
source "$HOME/.cargo/env"
```
Refer to the [releases page](https://github.com/CodSpeedHQ/runner/releases) to see all available versions.
## Usage
> [!NOTE]
> For now, the CLI only supports Ubuntu 20.04, 22.04, 24.04 and Debian 11, 12.
First, authenticate with your CodSpeed account:
```bash
codspeed auth login
```
Then, run benchmarks with the following command:
```bash
codspeed run
# Example, using https://github.com/CodSpeedHQ/codspeed-rust
codspeed run cargo codspeed run
# Example, using https://github.com/CodSpeedHQ/pytest-codspeed
codspeed run pytest ./tests --codspeed
# Example, using https://github.com/CodSpeedHQ/codspeed-node/tree/main/packages/vitest-plugin
codspeed run pnpm vitest bench
```
## Advanced usage
### Installing tools before running
You can install executors and instruments before running the benchmark with the `setup` command:
```bash
codspeed setup
```
This is especially useful when configuring environments with tools such as docker.
### Logging level
Use the `CODSPEED_LOG` environment variable to set the logging level:
```bash
CODSPEED_LOG=debug codspeed run ...
```
### Changing the mode of the runner
By default, the runner will run the benchmark in the `instrumentation` mode. You can specify the mode with the `--mode` flag of the `run` command:
```bash
# Run in the `instrumentation` mode
codspeed run --mode instrumentation
# Run in the `walltime` mode
codspeed run --mode walltime
```
> [!WARNING]
> We strongly recommend not changing this mode unless you know what you are doing.
> Using the `walltime` mode on traditional VMs/Hosted Runners will lead to inconsistent data. For the best results, we recommend using CodSpeed Hosted Macro Runners, which are fine-tuned for performance measurement consistency.
> Check out the [Walltime Instrument Documentation](https://docs.codspeed.io/instruments/walltime/) for more details.