Function duration
pub fn duration<'a>(
category: &'static CStr,
name: &'static CStr,
args: &'a [Arg<'_>],
) -> DurationScope<'a>
Expand description
Writes a duration event which ends when the current scope exits, or the
end
method is manually called.
Durations describe work which is happening synchronously on one thread. They can be nested to represent a control flow stack.
0 to 15 arguments can be associated with the event, each of which is used to annotate the duration with additional information.
NOTE: For performance reasons, it is advisable to create a cached context scope, which will
avoid expensive lookups when tracing is disabled. See the example in the duration!
macro.