diff --git a/src/test/bench/silly-test-spawn.rs b/src/test/bench/silly-test-spawn.rs new file mode 100644 index 000000000000..900796efe33d --- /dev/null +++ b/src/test/bench/silly-test-spawn.rs @@ -0,0 +1,16 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Useful smoketest for scheduler performance. +fn main() { + for _ in range(1, 100_000) { + do spawn { } + } +} diff --git a/src/test/bench/spawnone.rs b/src/test/bench/spawnone.rs new file mode 100644 index 000000000000..75485a7fb9ec --- /dev/null +++ b/src/test/bench/spawnone.rs @@ -0,0 +1,14 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Useful for checking syscall usage of baseline scheduler usage +fn main() { + do spawn { } +}