Skip to content
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@



## [4.1.1] - 2025-10-06

### <!-- 1 -->🐛 Bug Fixes
- Decrease stack sampling size for python (#125) by @not-matthias in [#125](https://github.com/CodSpeedHQ/runner/pull/125)
- Break when parsing invalid command by @not-matthias in [#122](https://github.com/CodSpeedHQ/runner/pull/122)


## [4.1.0] - 2025-10-02

### <!-- 0 -->🚀 Features
Expand Down Expand Up @@ -489,6 +496,7 @@
- Add linting components to the toolchain by @art049


[4.1.1]: https://github.com/CodSpeedHQ/runner/compare/v4.1.0..v4.1.1
[4.1.0]: https://github.com/CodSpeedHQ/runner/compare/v4.0.1..v4.1.0
[4.0.1]: https://github.com/CodSpeedHQ/runner/compare/v4.0.0..v4.0.1
[4.0.0]: https://github.com/CodSpeedHQ/runner/compare/v3.8.1..v4.0.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "codspeed-runner"
version = "4.1.0"
version = "4.1.1"
edition = "2024"
repository = "https://github.com/CodSpeedHQ/runner"
publish = false
Expand All @@ -9,6 +9,10 @@ publish = false
name = "codspeed"
path = "src/main.rs"

[features]
# Enable slow executor integration tests (valgrind/walltime). Disabled by default.
executor_tests = []


[dependencies]
anyhow = "1.0.75"
Expand Down
48 changes: 40 additions & 8 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub struct Cli {
enum Commands {
/// Run the bench command and upload the results to CodSpeed
Run(run::RunArgs),
/// Ingest existing Criterion output and produce a CodSpeed profile folder
IngestCriterion(run::ingest::IngestArgs),
/// Manage the CLI authentication state
Auth(auth::AuthArgs),
/// Pre-install the codspeed executors
Expand All @@ -58,16 +60,46 @@ pub async fn run() -> Result<()> {
let api_client = CodSpeedAPIClient::try_from((&cli, &codspeed_config))?;

match cli.command {
Commands::Run(_) => {} // Run is responsible for its own logger initialization
_ => {
Commands::Run(args) => run::run(args, &api_client, &codspeed_config).await?,
Commands::IngestCriterion(args) => {
if !args.upload {
init_local_logger()?;
}

// ingest and optionally upload the produced profile folder
let profile_folder = run::ingest::ingest_criterion(args.clone()).await?;
if args.upload {
// Reuse the existing `run` upload flow: construct RunArgs that skip running and point to the profile folder
let run_args = run::RunArgs {
upload_url: None,
token: None,
repository: None,
provider: None,
working_directory: None,
mode: run::RunnerMode::Walltime,
instruments: vec![],
mongo_uri_env_name: None,
profile_folder: Some(profile_folder),
message_format: None,
skip_upload: false,
skip_run: true,
skip_setup: true,
perf_run_args: run::PerfRunArgs::new(false, None),
command: vec![],
};

// Run the uploader path (this will call uploader::upload internally)
run::run(run_args, &api_client, &codspeed_config).await?;
}
}
Commands::Auth(args) => {
init_local_logger()?;
auth::run(args, &api_client).await?;
}
Commands::Setup => {
init_local_logger()?;
setup::setup().await?;
}
}

match cli.command {
Commands::Run(args) => run::run(args, &api_client, &codspeed_config).await?,
Commands::Auth(args) => auth::run(args, &api_client).await?,
Commands::Setup => setup::setup().await?,
}
Ok(())
}
6 changes: 5 additions & 1 deletion src/run/check_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ impl SystemInfo {
pub fn new() -> Result<Self> {
let os = System::distribution_id();
let os_version = System::os_version().ok_or(anyhow!("Failed to get OS version"))?;
let arch = System::cpu_arch();
let arch_raw = System::cpu_arch();
let arch = match arch_raw.as_str() {
"arm64" => "aarch64".to_string(),
other => other.to_string(),
};
let user = get_user()?;
let host = System::host_name().ok_or(anyhow!("Failed to get host name"))?;

Expand Down
Loading
Loading