Skip to content

Commit f7ab59e

Browse files
committed
Print benchmark total execution time
1 parent 27007af commit f7ab59e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

itest/rust/src/framework/runner.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ impl IntegrationTests {
104104
rust_file_count
105105
);
106106

107+
let clock = Instant::now();
107108
self.run_rust_benchmarks(benchmarks, scene_tree);
108-
self.conclude_benchmarks();
109+
let total_time = clock.elapsed();
110+
self.conclude_benchmarks(total_time);
109111
}
110112

111113
fn warn_if_debug(&self) {
@@ -275,7 +277,10 @@ impl IntegrationTests {
275277
}
276278
}
277279

278-
fn conclude_benchmarks(&self) {}
280+
fn conclude_benchmarks(&self, total_time: Duration) {
281+
let secs = total_time.as_secs_f32();
282+
println!("\nBenchmarks completed in {secs:.2}s.");
283+
}
279284

280285
fn update_stats(&mut self, outcome: &TestOutcome, test_file: &str, test_name: &str) {
281286
self.total += 1;

0 commit comments

Comments
 (0)