Skip to main content

Module prof

Module prof 

Source
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§

LayoutGuard
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.