Skip to content

Commit

Permalink
Per iteration timing
Browse files Browse the repository at this point in the history
  • Loading branch information
jafioti committed May 2, 2024
1 parent f2c3130 commit 07b7bb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/train_math_net/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ fn main() {
}
println!("Finished in {iter} iterations");
println!(
"Took {:.2}s",
(std::time::Instant::now() - start).as_secs_f32()
"Took {:.2}s, {:.2}µs / iter",
start.elapsed().as_secs_f32(),
start.elapsed().as_micros() / iter
);
}

Expand Down

0 comments on commit 07b7bb6

Please sign in to comment.