Expand description
Engine observability: per-operation traces, ring buffers of recent activity, and log2-bucket latency histograms.
Everything here is cheap enough to stay on in production — an Instant
pair and a few integer adds per operation (no allocation on the hot path
beyond the trace struct itself).
Structs§
- Counters
- Degradation counters — “this happened N times” facts that would otherwise vanish into fallback paths. Zero-cost atomics, always on.
- Counters
Snapshot - Plain-integer, JSON-serializable copy of
Countersfor the FFI/UI. - Histogram
- Log2-bucketed microsecond histogram: bucket i counts values in [2^i, 2^(i+1)) µs. 32 buckets cover > an hour.
- Index
Stats - Per-column memory accounting for one volume index.
- Metrics
Hub - Thread-safe metrics collector owned by the engine.
- Metrics
Snapshot - Aggregated, JSON-serializable snapshot for the FFI/UI.
- Query
Trace - Stage breakdown of one query, in microseconds.
- Scan
Trace - One index-established event of a volume: an initial scan/rescan (“scan”) or a snapshot restore (“snapshot”). Sharing one timeline keeps the ≤2s restore gate visible next to full-scan costs.
- Stage
- Microsecond stopwatch for stage timing.
- UsnTrace
- One applied USN batch.
Constants§
Statics§
- LAZY_
PERM_ 🔒REBUILD_ FALLBACKS - OFFSET_
TABLE_ 🔒REBUILD_ FALLBACKS - The query layer has no
MetricsHubhandle (its degradations normally go through the diag ring — see memo.rs), so these counters are process globals folded into every snapshot.