Expand description
Cross-cutting performance instrumentation.
This module provides instruction-count measurement primitives used across endpoints, ops, timers, and background tasks.
It is intentionally crate-level infrastructure, not part of the domain layering (endpoints → ops → model). Instrumentation modules are layer-neutral and may be used anywhere.
Structs§
- Perf
Entry - PerfEntry Aggregated perf counters keyed by kind (endpoint vs timer) and label.
Enums§
- PerfKey
- PerfKey splitting up by Timer type to avoid confusing string comparisons
Constants§
- PERF_
LAST - Last snapshot used by the
perf!macro.
Functions§
- entries
- Snapshot all recorded perf counters, sorted by key. Entries are sorted by (kind, label).
- perf_
counter - Returns the call-context instruction counter for the current execution.
- record
- Record a counter under the provided key.
- record_
endpoint - record_
timer