Macro puffin::profile_scope

source ·
macro_rules! profile_scope {
    ($id:expr) => { ... };
    ($id:expr, $data:expr) => { ... };
}
Expand description

Profile the current scope with the given name (unique in the parent scope).

Names should be descriptive, ASCII and without spaces.

Example: profile_scope!("load_mesh");.

An optional second argument can be a string (e.g. a mesh name) to help diagnose what was slow. Example: profile_scope!("load_mesh", mesh_name);

Overhead: around 140 ns on 2020 Intel MacBook Pro.