pub fn phase<T>(phase: Phase, body: impl FnOnce() -> T) -> TAvailable on crate feature
profiling only.Expand description
Run body and charge its elapsed time to phase.
Nested phases are not double-counted into each other, because each variant is charged to its own bucket and the buckets are summed rather than nested. A phase entered from inside another — glyph placement inside a clip resolution, which is what a text clip does — therefore appears in both, and the report says so rather than pretending the buckets partition the engine half.