Skip to main content

span

Function span 

Source
pub fn span(name: &'static str) -> TracySpanGuard
Expand description

Create a scoped profiling span that records its duration on drop.

This is the primary entry point for instrumenting a code region. The returned TracySpanGuard records the span into the thread-local ring buffer when it goes out of scope.

ยงExamples

use martensite_devtools::tracy;

{
    let _g = tracy::span("scoped_region");
    // ... work ...
} // span recorded here