WorkCounters

How many times each O(N) step of the scene pipeline has run.

In the namespace construct. Declared in src/libs/libconstruct/construct/model/WorkCounters.hpp.

Detailed description

A test seam (scene-tree-model-view §TMQ-4). LogicalSceneCompiler declares no signal and SDFLayer is not a QObject, so a test cannot count their work through signals. Each step increments its counter once per call; a test resets the counters, drives a gesture, and reads how much model work the gesture caused. A view-state gesture must cause none (§TMA-3).

Relaxed atomics: the counters order nothing, and the steps can run on a worker thread (the worker viewport rebuilds its own Construct).

A step that runs under a Span also adds its time. modelNanoseconds() is the time of the outermost spans only, so a step inside another counts once: the GUI-thread time of the model work, apart from the tree's own (scene-tree-model-view §TMA-9, TMW-20).

In this section