pub struct Work {
pub applications: u64,
pub touched: u64,
pub materialised: u64,
pub recomputed: u64,
pub steps: u64,
}Expand description
What one Engine::render cost, in units that do not depend on the machine.
Wall-clock is measured in the harness; this is what a test asserts on, because “the count did not visit every row” is the claim, and a timing assertion in CI is a flake.
Fields§
§applications: u64Per-element functions applied — the f of a map_list, the predicate of a filter_list.
touched: u64Entries a delta operator inserted, updated or removed.
materialised: u64Entries copied to hand a pointwise consumer a Value::List.
recomputed: u64Pointwise operators re-evaluated.
steps: u64What the backend executed inside all of those, if it counts
(crate::backend::Steps); 0 when it does not, which is not the same as no work.
The other four are what the engine did to its arrangements, and they stop at the boundary of a call: one application is one application whether the function it ran read a field or rebuilt a page. This is the inside of those calls, and it is what makes a plan that hides its work in one opaque operator visible beside one that decomposed.
Not in Work::total, deliberately. The other four are commensurable — entries and
applications, all O(1) each — and this is a different unit by two or three orders of
magnitude, so adding it would drown every gate that reads the total. A gate that wants it
asks for it by name.