Call more fuctions to see out profiling behaves.

This commit is contained in:
Bill Thiede 2019-10-24 13:57:41 -07:00
parent 5c1ff3ed61
commit b280b11480
2 changed files with 34 additions and 3 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -24,10 +24,41 @@ fn two(runtime: Duration) {
}
}
#[inline(never)]
fn three(runtime: Duration) {
println!("Starting three");
let start = Instant::now();
loop {
let diff = Instant::now() - start;
if diff > runtime {
return;
}
}
}
#[inline(never)]
fn four(runtime: Duration) {
println!("Starting four");
let start = Instant::now();
loop {
let diff = Instant::now() - start;
if diff > runtime {
return;
}
}
}
fn main() {
let runtime = Duration::new(2, 0);
one(runtime);
four(runtime);
three(runtime);
two(runtime);
four(runtime);
three(runtime);
two(runtime);
four(runtime);
three(runtime);
one(runtime);
four(runtime);
}