Skip to content

Commit

Permalink
Rollup merge of rust-lang#73142 - ehuss:std-benches, r=dtolnay
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RalfJung authored Jun 18, 2020
2 parents 6ca9dce + bbb3321 commit d67e993
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ path = "../liballoc/tests/lib.rs"
[[bench]]
name = "collectionsbenches"
path = "../liballoc/benches/lib.rs"
test = true

[[bench]]
name = "vec_deque_append_bench"
Expand Down
1 change: 1 addition & 0 deletions src/libcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ path = "../libcore/tests/lib.rs"
[[bench]]
name = "corebenches"
path = "../libcore/benches/lib.rs"
test = true

[dev-dependencies]
rand = "0.7"
Expand Down
5 changes: 5 additions & 0 deletions src/libstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ std_detect_dlsym_getauxval = []
threads = 125
# Maximum heap size
heap_size = 0x8000000

[[bench]]
name = "stdbenches"
path = "benches/lib.rs"
test = true

0 comments on commit d67e993

Please sign in to comment.