mirror of https://github.com/rust-lang/rust.git
Stabilize the runtime of libtest-padding
The body of these benchmarks is close to empty but not literally empty. This was making the runtime of the benchmarks (which are compiled without optimizations!) flicker between 9 ns and 10 ns runtime, which changes the padding and breaks the test. Recent changes to the standard library have pushed the runtime closer to 10 ns when unoptimized, which is why we haven't seen such failures before in CI. Contributors can also induce such failures before this PR by running the run-make tests while the system is under heavy load.
This commit is contained in:
parent
72b7171031
commit
18cb2fa851
|
@ -8,11 +8,7 @@ fn short_test_name() {}
|
||||||
fn this_is_a_really_long_test_name() {}
|
fn this_is_a_really_long_test_name() {}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn short_bench_name(b: &mut test::Bencher) {
|
fn short_bench_name(b: &mut test::Bencher) {}
|
||||||
b.iter(|| 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn this_is_a_really_long_bench_name(b: &mut test::Bencher) {
|
fn this_is_a_really_long_bench_name(b: &mut test::Bencher) {}
|
||||||
b.iter(|| 1);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue