profiler

Function profiler 

Source
pub fn profiler() -> &'static dyn EmbeddedProfiler
Expand description

Returns a reference to the configured profiler.

If a profiler hasn’t yet been set by set_profiler, the no-op profiler will be returned. Generally, you should use one of the other provided functions rather than getting a reference through this function.

let start = embedded_profiling::profiler().start_snapshot();
// (...)
let snapshot = embedded_profiling::profiler().end_snapshot(start, "doc-example");