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.
evidence_visits
Read the evidence-visit counter without resetting it, for deltas around a region of work.
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.
take_evidence_visits
Read and reset the evidence-visit counter for this thread.
take_path_probes
Read and reset the path-probe counter for this thread.
timed
Helper: measure f and record the result under fingerprint. Returns the value produced by f.