deno
6c2ebb6e - feat(node): implement performance.nodeTiming and uvMetricsInfo (#31085)

Commit
131 days ago
feat(node): implement performance.nodeTiming and uvMetricsInfo (#31085) Implement `performance.nodeTiming` from `node:perf_hooks` with a proper `PerformanceNodeTiming` class instead of an empty object stub. Implements: - `name`, `entryType`, `startTime`, `duration` (PerformanceEntry props) - `nodeStart`, `v8Start`, `environment`, `bootstrapComplete` (timing milestones, approximated since Deno doesn't track these separately) - `loopStart`, `loopExit`, `idleTime` (event loop timing, partially stubbed) - `uvMetricsInfo` getter returning `{ loopCount, events, eventsWaiting }` backed by actual event loop counters in deno_core's UvLoopInner - `toJSON()` for serialization The event loop metrics are tracked in deno_core: - `loop_count`: incremented each event loop iteration - `events`: incremented per I/O event (TCP/TTY) processed - `events_waiting`: reserved for future use - Exposed via `uv_loop_metrics_info()` and `op_node_uv_metrics_info` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading