Call more fuctions to see out profiling behaves.
This commit is contained in:
parent
5c1ff3ed61
commit
b280b11480
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
33
src/main.rs
33
src/main.rs
@ -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() {
|
fn main() {
|
||||||
let runtime = Duration::new(2, 0);
|
let runtime = Duration::new(2, 0);
|
||||||
|
|
||||||
one(runtime);
|
four(runtime);
|
||||||
|
three(runtime);
|
||||||
two(runtime);
|
two(runtime);
|
||||||
|
four(runtime);
|
||||||
|
three(runtime);
|
||||||
|
two(runtime);
|
||||||
|
four(runtime);
|
||||||
|
three(runtime);
|
||||||
one(runtime);
|
one(runtime);
|
||||||
|
four(runtime);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user