diff --git a/benchmarks/toy-rs/src/main.rs b/benchmarks/toy-rs/src/main.rs index 48df30f..ab93696 100644 --- a/benchmarks/toy-rs/src/main.rs +++ b/benchmarks/toy-rs/src/main.rs @@ -3,19 +3,20 @@ use coz; use std::thread; #[no_mangle] pub fn a_first_fn() { - for _x in 0..2000000000 {} + for _x in 0..2000000 {} } #[no_mangle] pub fn b_second_fn() { - for _y in 0..1900000000 {} + for _y in 0..1900000 {} } fn main() { - let handle1 = thread::spawn(|| a_first_fn()); - let handle2 = thread::spawn(|| b_second_fn()); - - handle1.join().unwrap(); - handle2.join().unwrap(); - coz::progress!(); + for _n in 1..1000 { + let handle1 = thread::spawn(|| a_first_fn()); + let handle2 = thread::spawn(|| b_second_fn()); + handle1.join().unwrap(); + handle2.join().unwrap(); + coz::progress!(); + } }