Skip to main content

section

Function section 

Source
pub fn section(section: &'static str) -> Span
Expand description

Build a profiling span for a named logical section.

Callers enter the returned span with .entered() for synchronous sections or use Future::instrument(span) for async blocks. Function-level profiling should prefer #[tracing::instrument].