macro_rules! perf {
($($label:tt)*) => { ... };
}Expand description
Log elapsed instruction counts since the last perf! invocation in this thread.
- Uses a thread-local
PERF_LASTsnapshot. - Computes
delta = now - last. - Prints a human-readable line for debugging.
Intended usage:
- Long-running maintenance tasks where you want checkpoints in a single call.
Note: perf! is independent of endpoint perf scopes and does not touch the
endpoint stack used by dispatch.
Notes:
- On non-wasm targets,
perf_counter()returns 0, so this becomes a no-op-ish counter (still records 0 deltas); this keeps unit tests compiling cleanly.