macro_rules! span {
    ($name: expr) => { ... };
    ($name: expr, $callstack_depth: expr) => { ... };
}
Expand description

Start a new Tracy span with function, file, and line determined automatically.

Panics

span! will panic if the Client isn’t running at the time this macro is invoked.

Examples

Begin a span region, which will be terminated once _span goes out of scope:

use tracy_client::{Client, span};
let _span = span!("some span");

It is also possible to specify the number of frames to capture in the callstack:

use tracy_client::span;
let _span = span!("some span", 32);