Struct puffin::ThreadProfiler [−][src]
pub struct ThreadProfiler { /* fields omitted */ }
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 and report scopes to the global profiler.
For instance, when compiling for WASM the default timing function (puffin::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.