#egui #profiler #flame-graph

puffin_egui

Show puffin profiler flamegraph in-game using egui

36 releases (breaking)

0.29.0 Jul 31, 2024
0.27.0 Apr 6, 2024
0.26.0 Feb 14, 2024
0.24.0 Nov 24, 2023
0.4.1 Jul 5, 2021

#889 in GUI

Download history 573/week @ 2025-01-21 568/week @ 2025-01-28 682/week @ 2025-02-04 688/week @ 2025-02-11 679/week @ 2025-02-18 934/week @ 2025-02-25 839/week @ 2025-03-04 980/week @ 2025-03-11 532/week @ 2025-03-18 429/week @ 2025-03-25 470/week @ 2025-04-01 686/week @ 2025-04-08 326/week @ 2025-04-15 437/week @ 2025-04-22 272/week @ 2025-04-29 306/week @ 2025-05-06

1,437 downloads per month
Used in 11 crates

MIT/Apache

195KB
4K SLoC

Show puffin profiler flamegraph in-game using egui

Embark Embark Crates.io Docs

puffin is an instrumentation profiler where you opt-in to profile parts of your code:

fn my_function() {
    puffin::profile_function!();
    if ... {
        puffin::profile_scope!("load_image", image_name);
        ...
    }
}

puffin_egui allows you to inspect the resulting profile data using egui with only one line of code:

puffin_egui::profiler_window(egui_ctx);

See the examples/ folder for how to use it with eframe.

To try it out, run cargo run --release --example eframe

Dependencies

~7–14MB
~166K SLoC