netstack3_base

Trait TracingContext

Source
pub trait TracingContext {
    type DurationScope;

    // Required method
    fn duration(&self, name: &'static CStr) -> Self::DurationScope;
}
Expand description

A context for emitting tracing data.

Required Associated Types§

Source

type DurationScope

The scope of a trace duration.

Its lifetime corresponds to the beginning and end of the duration.

Required Methods§

Source

fn duration(&self, name: &'static CStr) -> Self::DurationScope

Writes a duration event which ends when the returned scope is dropped.

Durations describe work which is happening synchronously on one thread. Care should be taken to avoid a duration’s scope spanning an await point in asynchronous code.

Implementors§