#profiler #instrumentation #gamedev

puffin-imgui

ImGui GUI bindings for the Puffin profiler

6 releases (breaking)

0.7.0 Mar 8, 2021
0.6.1 Mar 8, 2021
0.6.0 Feb 5, 2021
0.5.0 Nov 15, 2020
0.2.0 Aug 10, 2020

#62 in Profiling

Download history 37/week @ 2020-12-25 82/week @ 2021-01-01 120/week @ 2021-01-08 126/week @ 2021-01-15 134/week @ 2021-01-22 198/week @ 2021-01-29 92/week @ 2021-02-05 162/week @ 2021-02-12 80/week @ 2021-02-19 101/week @ 2021-02-26 175/week @ 2021-03-05 223/week @ 2021-03-12 78/week @ 2021-03-19 368/week @ 2021-03-26 57/week @ 2021-04-02 157/week @ 2021-04-09

483 downloads per month
Used in profiling

MIT/Apache

57KB
1.5K SLoC

Puffin ImGui Flamegraph

Embark Embark Crates.io Docs dependency status

This crate provides a flamegraph view of the data collected by the Puffin profiler.

Example view

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);
    }
}

Dependencies

~4.5MB
~88K SLoC