Skip to content

Commit 4de9519

Browse files
authored
Merge branch 'main' into time-scale-benches
2 parents b166c4d + 16ef42c commit 4de9519

File tree

13 files changed

+51
-33
lines changed

13 files changed

+51
-33
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: moonrepo/setup-rust@v1
1616
with:
1717
components: rustfmt, clippy
18-
- uses: pre-commit/action@v2.0.0
18+
- uses: pre-commit/action@v3.0.1
1919
with:
2020
extra_args: --all-files
2121

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/bencher_compat/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed-bencher-compat"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.74" # MSRV
55
edition = "2021"
66
description = "Bencher compatibility layer for CodSpeed"
@@ -19,7 +19,7 @@ keywords = ["codspeed", "benchmark", "bencher"]
1919

2020
[dependencies]
2121
bencher = "0.1.5"
22-
codspeed = { path = "../codspeed", version = "=2.9.1" }
22+
codspeed = { path = "../codspeed", version = "=2.10.0" }
2323

2424
[[bench]]
2525
name = "bencher_example"

crates/cargo-codspeed/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-codspeed"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
edition = "2021"
55
description = "Cargo extension to build & run your codspeed benchmarks"
66
authors = ["Arthur Pastel <arthur@codspeed.io>"]
@@ -18,15 +18,15 @@ categories = [
1818
keywords = ["codspeed", "benchmark", "cargo"]
1919

2020
[dependencies]
21-
cargo_metadata = "0.19.1"
21+
cargo_metadata = "0.19.2"
2222
clap = { version = "=4.5.17", features = ["derive", "env"] }
2323
termcolor = "1.4"
2424
anyhow = "1.0.86"
2525
itertools = { workspace = true }
2626
anstyle = "1.0.8"
2727
serde = { workspace = true }
2828
serde_json = { workspace = true }
29-
codspeed = { path = "../codspeed", version = "=2.9.1" }
29+
codspeed = { path = "../codspeed", version = "=2.10.0" }
3030
glob = "0.3.2"
3131
statrs = "0.18.0"
3232

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, defaults to # of CPUs.
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 =

crates/cargo-codspeed/src/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ impl BuildOptions<'_> {
115115
// Add debug info (equivalent to -g)
116116
rust_flags.push_str(" -C debuginfo=2");
117117

118+
// Prevent debug info stripping
119+
// https://doc.rust-lang.org/cargo/reference/profiles.html#release
120+
// According to cargo docs, for release profile which we default to:
121+
// `strip = "none"` and `debug = false`.
122+
// In practice, if we set debug info through RUSTFLAGS, cargo still strips them, most
123+
// likely because debug = false in the release profile.
124+
// We also need to disable stripping through rust flags.
125+
rust_flags.push_str(" -C strip=none");
126+
118127
// Add the codspeed cfg flag if instrumentation mode is enabled
119128
if measurement_mode == MeasurementMode::Instrumentation {
120129
rust_flags.push_str(" --cfg codspeed");

crates/codspeed/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.74" # MSRV
55
edition = "2021"
66
description = "Core instrumentation library for CodSpeed"

crates/criterion_compat/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed-criterion-compat"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.74" # MSRV
55
edition = "2021"
66
description = "Criterion.rs compatibility layer for CodSpeed"
@@ -17,8 +17,8 @@ categories = [
1717
]
1818
keywords = ["codspeed", "benchmark", "criterion"]
1919
[dependencies]
20-
criterion = { package = "codspeed-criterion-compat-walltime", path = "./criterion_fork", version = "=2.9.1", default-features = false }
21-
codspeed = { path = "../codspeed", version = "=2.9.1" }
20+
criterion = { package = "codspeed-criterion-compat-walltime", path = "./criterion_fork", version = "=2.10.0", default-features = false }
21+
codspeed = { path = "../codspeed", version = "=2.10.0" }
2222
colored = "2.1.0"
2323

2424
futures = { version = "0.3", default-features = false, optional = true }

crates/criterion_compat/criterion_fork/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = [
44
"Brook Heisler <brookheisler@gmail.com>",
55
]
66
name = "codspeed-criterion-compat-walltime"
7-
version = "2.9.1"
7+
version = "2.10.0"
88
edition = "2018"
99

1010
description = "Statistics-driven micro-benchmarking library"
@@ -17,7 +17,7 @@ license = "Apache-2.0 OR MIT"
1717
exclude = ["book/*"]
1818

1919
[dependencies]
20-
codspeed = { path = "../../codspeed", version = "=2.9.1" }
20+
codspeed = { path = "../../codspeed", version = "=2.10.0" }
2121
anes = "0.1.4"
2222
once_cell = "1.14"
2323
criterion-plot = { version = "0.5.0" }

crates/divan_compat/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed-divan-compat"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.80"
55
edition = "2021"
66
description = "Divan compatibility layer for CodSpeed"
@@ -18,9 +18,9 @@ categories = [
1818
keywords = ["codspeed", "benchmark", "divan"]
1919

2020
[dependencies]
21-
codspeed = { path = "../codspeed", version = "=2.9.1" }
22-
divan = { package = "codspeed-divan-compat-walltime", path = "./divan_fork", version = "=2.9.1" }
23-
codspeed-divan-compat-macros = { version = "=2.9.1", path = './macros' }
21+
codspeed = { path = "../codspeed", version = "=2.10.0" }
22+
divan = { package = "codspeed-divan-compat-walltime", path = "./divan_fork", version = "=2.10.0" }
23+
codspeed-divan-compat-macros = { version = "=2.10.0", path = './macros' }
2424

2525
[[bench]]
2626
name = "basic_example"

crates/divan_compat/benches/basic_example.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use codspeed_divan_compat::Bencher;
22

3-
fn fibo(n: i32) -> i32 {
3+
fn fibo(n: u64) -> u64 {
44
let mut a = 0;
55
let mut b = 1;
66

@@ -14,12 +14,12 @@ fn fibo(n: i32) -> i32 {
1414
}
1515

1616
#[codspeed_divan_compat::bench]
17-
fn fibo_500() -> i32 {
18-
codspeed_divan_compat::black_box(fibo(500))
17+
fn fibo_50() -> u64 {
18+
codspeed_divan_compat::black_box(fibo(50))
1919
}
2020

2121
#[codspeed_divan_compat::bench]
22-
fn fibo_10() -> i32 {
22+
fn fibo_10() -> u64 {
2323
codspeed_divan_compat::black_box(fibo(10))
2424
}
2525

crates/divan_compat/divan_fork/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed-divan-compat-walltime"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.80.0"
55
edition = "2021"
66
authors = ["Nikolai Vazquez"]
@@ -23,7 +23,7 @@ regex = { package = "regex-lite", version = "0.1", default-features = false, fea
2323
"std",
2424
"string",
2525
] }
26-
codspeed = { path = "../../codspeed", version = "=2.9.1" }
26+
codspeed = { path = "../../codspeed", version = "=2.10.0" }
2727

2828
[target.'cfg(unix)'.dependencies]
2929
libc = "0.2.148"

crates/divan_compat/macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codspeed-divan-compat-macros"
3-
version = "2.9.1"
3+
version = "2.10.0"
44
rust-version = "1.80"
55
edition = "2021"
66
description = "Macros for the Divan compatibility layer for CodSpeed"

0 commit comments

Comments
 (0)