Files
osui/examples/benchmark.rs
T
2026-01-30 17:15:12 +01:00

26 lines
590 B
Rust

use std::sync::Arc;
use osui::prelude::*;
pub fn main() {
let engine = Benchmark::new(Console::new());
let mut benchmark_result = Vec::new();
for items in 0..10 {
benchmark_result.push(
engine
.run(move |cx| {
rsx! {
for _ in (0..items) {
"Hello, world!"
}
}
.view(cx.clone())
})
.expect("Failed to run engine"),
);
}
println!("{benchmark_result:?}");
}