Expand description
Opt-in layout profiling counters gated behind STRATA_PERF_LOG.
The counters accumulate inside one root compute_layout invocation and are
printed as a ranked table when the outermost call completes. All entry
points are cheap no-ops unless the environment variable is present.
Structs§
- Layout
Guard - Guard that owns the root layout report lifecycle and unwinds on every exit path.
- Scope
- Guard that records elapsed time into a slot for its lexical scope.
Enums§
- Slot
- Individual layout work category tracked by the profiler.
Functions§
- enabled
- Whether layout profiling is enabled.
- enter_
layout - Marks the beginning of a root layout call. Returns true when this call is the outermost layout invocation and therefore owns the report lifecycle.
- leave_
layout - Marks the end of a layout call, printing the ranked report at the root.
- observe_
width - Records one child count observation for the widest container report.
- record
- Adds a measured duration to a profiling slot.