27 releases (breaking)

0.22.0 May 24, 2023
0.20.1 Jan 30, 2023
0.19.0 Dec 13, 2022
0.18.0 Nov 8, 2022
0.5.0 Nov 15, 2020

#1237 in GUI

Download history 2/week @ 2024-10-30 1/week @ 2024-11-06 3/week @ 2024-11-13 3/week @ 2024-11-20 7/week @ 2024-12-04 48/week @ 2024-12-11 99/week @ 2024-12-25 10/week @ 2025-01-29 79/week @ 2025-02-05

89 downloads per month
Used in ambient_profiling

MIT/Apache

165KB
3.5K SLoC

Puffin ImGui Flamegraph

Embark Embark Crates.io Docs

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

lib.rs:

An imgui-rs interface for puffin.

Usage:

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

~13–19MB
~275K SLoC