[−][src]Macro coarse_prof::profile
Use this macro to add the current scope to profiling. In effect, the time taken from entering to leaving the scope will be measured.
Internally, the scope is inserted in the scope tree of the global
thread-local PROFILER
.
Example
The following example will profile the scope "foo"
, which has the scope
"bar"
as a child.
use coarse_prof::profile; { profile!("foo"); { profile!("bar"); // ... do something ... } // ... do some more ... }