CLI to gather performance data from CI environments and upload performance reports to CodSpeed
The codspeed-runner
CLI is designed to be used in CI environments.
The following providers are supported:
- GitHub Actions: Usage with
@CodSpeedHQ/action
is recommended. - Buildkite
If you want to use the CLI with another provider, you can open an issue or chat with us on Discord 🚀
You can check out the implementation of the supported providers for reference.
CODSPEED_RUNNER_VERSION=<insert-version> # refer to https://github.com/CodSpeedHQ/runner/releases for available versions
curl -fsSL https://github.com/CodSpeedHQ/runner/releases/download/$CODSPEED_RUNNER_VERSION/codspeed-runner-installer.sh | bash
source "$HOME/.cargo/env"
Refer to the releases page to see all available versions.
Note
For now, the CLI only supports Ubuntu 20.04 and 22.04.
Example of a command to run benchmarks with Vitest:
codspeed-runner --token=$CODSPEED_TOKEN -- pnpm vitest bench
Usage: codspeed-runner [OPTIONS] [COMMAND]...
Arguments:
[COMMAND]... The bench command to run
Options:
--upload-url <UPLOAD_URL>
The upload URL to use for uploading the results, useful for on-premises installations
--token <TOKEN>
The token to use for uploading the results, if not provided it will be read from the CODSPEED_TOKEN environment variable
--working-directory <WORKING_DIRECTORY>
The directory where the command will be executed
-h, --help
Print help
Use the CODSPEED_LOG
environment variable to set the logging level:
CODSPEED_LOG=debug codspeed-runner ...