pub struct ThreadProfiler { /* private fields */ }
Expand description

Collects profiling data for one thread

Implementations

Explicit initialize with custom callbacks.

If not called, each thread will use the default nanosecond source (now_ns()) and report scopes to the global profiler (global_reporter()).

For instance, when compiling for WASM the default timing function (now_ns()) won’t work, so you’ll want to call puffin::ThreadProfiler::initialize(my_timing_function, puffin::global_reporter);.

Returns position where to write scope size once the scope is closed.

Do something with the thread local ThreadProfiler

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.