Skip to content

Commit d4335e2

Browse files
feat(cargo-codspeed): support --jobs flag in build command
1 parent 17a5e27 commit d4335e2

File tree

1 file changed

+9
-0
lines changed
  • crates/cargo-codspeed/src

1 file changed

+9
-0
lines changed

crates/cargo-codspeed/src/app.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ enum Commands {
6161
#[arg(long)]
6262
no_default_features: bool,
6363

64+
/// Number of parallel jobs.
65+
#[arg(short, long)]
66+
jobs: Option<u32>,
67+
6468
/// Build the benchmarks with the specified profile
6569
#[arg(long, default_value = "release")]
6670
profile: String,
@@ -84,6 +88,7 @@ pub fn run(args: impl Iterator<Item = OsString>) -> Result<()> {
8488
filters,
8589
features,
8690
all_features,
91+
jobs,
8792
no_default_features,
8893
profile,
8994
} => {
@@ -98,6 +103,10 @@ pub fn run(args: impl Iterator<Item = OsString>) -> Result<()> {
98103
passthrough_flags.push("--no-default-features".to_string());
99104
}
100105

106+
if let Some(jobs) = jobs {
107+
passthrough_flags.push(format!("--jobs={jobs}"));
108+
}
109+
101110
passthrough_flags
102111
};
103112
let features =

0 commit comments

Comments
 (0)