[][src]Macro gdnative_core::profile_sig

macro_rules! profile_sig {
    ($tag:expr) => { ... };
}

Convenience macro to create a profiling signature with a given tag.

The expanded code will panic at runtime if the file name or tag contains :: or any NUL-bytes.

See nativescript::profiling::Signature for more information.

Examples

use gdnative_core::profile_sig;
use gdnative_core::nativescript::profiling::profile;

let answer = profile(profile_sig!("foo"), || 42);
assert_eq!(42, answer);