Skip to content

Commit a37e271

Browse files
authored
Rollup merge of rust-lang#73142 - ehuss:std-benches, r=dtolnay
Ensure std benchmarks get tested. This ensures that the std benchmarks don't break in the future. Currently they aren't compiled or tested on CI, so they can easily bitrot. Testing a benchmark runs it with one iteration. Adding these should only add a few seconds to CI. Closes rust-lang#54176 Closes rust-lang#61913
2 parents 8d5c764 + bbb3321 commit a37e271

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Diff for: src/liballoc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ path = "../liballoc/tests/lib.rs"
2525
[[bench]]
2626
name = "collectionsbenches"
2727
path = "../liballoc/benches/lib.rs"
28+
test = true
2829

2930
[[bench]]
3031
name = "vec_deque_append_bench"

Diff for: src/libcore/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ path = "../libcore/tests/lib.rs"
1919
[[bench]]
2020
name = "corebenches"
2121
path = "../libcore/benches/lib.rs"
22+
test = true
2223

2324
[dev-dependencies]
2425
rand = "0.7"

Diff for: src/libstd/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,8 @@ std_detect_dlsym_getauxval = []
7474
threads = 125
7575
# Maximum heap size
7676
heap_size = 0x8000000
77+
78+
[[bench]]
79+
name = "stdbenches"
80+
path = "benches/lib.rs"
81+
test = true

0 commit comments

Comments
 (0)