Crates.io | puffin-imgui |
lib.rs | puffin-imgui |
version | 0.22.0 |
source | src |
created_at | 2020-08-10 10:59:26.867484 |
updated_at | 2023-05-24 14:48:07.363668 |
description | ImGui GUI bindings for the Puffin profiler |
homepage | https://github.com/EmbarkStudios/puffin |
repository | https://github.com/EmbarkStudios/puffin |
max_upload_size | |
id | 275013 |
size | 90,688 |
This crate provides a flamegraph view of the data collected by the Puffin profiler.
fn main() {
puffin::set_scopes_on(true); // you may want to control this with a flag
let mut puffin_ui = puffin_imgui::ProfilerUi::default();
// game loop
loop {
puffin::GlobalProfiler::lock().new_frame();
{
puffin::profile_scope!("slow_code");
slow_code();
}
puffin_ui.window(ui);
}
}