Benchmarking

This commit is contained in:
2026-01-30 15:08:01 +01:00
parent 2d79b1dfbb
commit 41e7b2a10c
5 changed files with 53 additions and 121 deletions
+7 -2
View File
@@ -3,8 +3,13 @@ use std::sync::Arc;
use osui::prelude::*;
pub fn main() {
let engine = SimpleBenchmark::new(Console::new());
engine.run(app).expect("Failed to run engine");
let engine = Benchmark::new(Console::new());
let benchmark_result = engine.run(app).expect("Failed to run engine");
println!("Avg: {} μs", benchmark_result.average);
println!("Min: {} μs", benchmark_result.min);
println!("Max: {} μs", benchmark_result.max);
println!("Tot: {} μs", benchmark_result.total);
println!("Tot Render: {} μs", benchmark_result.total_render);
}
fn app(cx: &Arc<Context>) -> View {