Expand description
Central timing instrumentation for startup profiling.
Port of the upstream packages/coding-agent/src/core/timings.ts. Enable with
the RPI_TIMING=1 environment variable; disabled builds pay only a single
atomic load per call.
Timings are grouped by namespace (main for the primary startup path,
extensions for JS/Rust extension loading) and flushed once at shutdown.
Enums§
Functions§
- enabled
- True when
RPI_TIMING=1. Evaluated once. - print_
timings - Print every accumulated namespace to stderr. No-op unless
RPI_TIMING=1. - reset
- Reset a namespace’s timings and mark “now” as its reference point.
- time
- Record the elapsed time since the previous
time/resetin this namespace.