Node.js Production Diagnostics & Profiling

Parent: JavaScript and Node.js · researched 2026-06-02T17:33:52.709Z· 7 sources · 8 concepts · skill nodejs-diagnostics-profiling

This reference is about measuring a real Node.js process — locating where CPU

Overview

1. The Inspector / Chrome DevTools Protocol (CDP)

2. Programmatic profiling via `node:inspector`

3. The V8 profilers as CLI flags (no client needed)

4. Heap snapshots & the memory-leak hunting workflow

5. `perf_hooks` — measurement, not sampling

6. `diagnostics_channel` — production instrumentation with zero idle cost

7. Diagnostic reports & trace events

Tools & frameworks

Methodology — a triage workflow

Practical patterns

Anti-patterns

Troubleshooting

References

Children

Frontier under this node: Diagnostic reports (--report-*) & trace_events (--trace-event-categories), Ecosystem tools: clinic.js (doctor/flame/bubbleprof), 0x flamegraphs, autocannon load-driven profiling, Heap snapshots & three-snapshot memory-leak hunting (--heapsnapshot-signal, --heapsnapshot-near-heap-limit, retainer analysis), Inspector / Chrome DevTools Protocol (--inspect/--inspect-brk/--inspect-wait, inspector.Session, CDP over WebSocket), Programmatic profiling via node:inspector (Profiler.* / HeapProfiler.* domains), V8 profilers as CLI flags (--prof/--prof-process tick processor, --cpu-prof, --heap-prof), diagnostics_channel + TracingChannel (zero-idle-cost instrumentation, built-in http/net channels, bindStore), perf_hooks measurement (PerformanceObserver, monitorEventLoopDelay histogram, eventLoopUtilization for pool sizing, timerify, createHistogram)

← the whole tree · 3D view· how to read this page