macro_rules! function_scope { () => { ... }; ($data:expr) => { ... }; }
Expand description
Opens a scope automatically named after the current function.
- profiling::function_scope!() - Opens a scope with the current function name
- profiling::function_scope!(data: &str) - Opens a scope with the current function name and an extra data field.
fn function_a(){
profiling::function_scope!();
}
fn function_b(iteration: u32){
profiling::function_scope!(format!("iteration {}", iteration).as_str());
}