Skip to main content

Module profile

Module profile 

Source
Expand description

Opt-in execution telemetry (doc §269). Collected via a thread-local so no validation API signatures change. Enable with enable(), consume with take().

Shape-cache counters are accumulated locally by each evaluator and published once when it is dropped, avoiding a thread-local operation per lookup.

Structs§

ProfileCollector
QueryRecord
Per-query performance record.
ShapeCacheRecord
Aggregate shape-cache telemetry for one profiling session.
ShapeRecord
Per-shape or per-rule wall-clock record. One entry per distinct label (shape IRI, @N slot id, or rule[N]).

Enums§

ExecutorKind

Functions§

enable
Enable profiling for the current thread. Resets any previous collector.
fingerprint
Derive a short fingerprint from a canonical query string.
record
Record one query invocation. No-op when profiling is disabled.
record_shape
Record one shape/rule evaluation. No-op when profiling is disabled.
take
Disable profiling and return the collected data, if any.
timed
Helper: measure f and record the result under fingerprint. Returns the value produced by f.