/node-perf-demo

Node.js profiling

Primary LanguageJavaScript

image

Inspector

Dev Tools

https://nodejs.org/en/docs/guides/debugging-getting-started/

$ node --inspect-brk src/app.js cache

API

https://nodejs.org/docs/latest-v14.x/api/inspector.html

$ node src/inspector.js

Performance hooks

https://nodejs.org/docs/latest-v14.x/api/perf_hooks.html

https://nodejs.org/docs/latest-v14.x/api/async_hooks.html

$ node src/perf-hooks.js

Profiling Log

https://nodejs.org/en/docs/guides/simple-profiling/

$ node --prof src/app.js cache
$ node --prof-process isolate-0x4ae79a0-78045-v8.log > processed.txt

Reference Docs

Don't Block the Event Loop

https://nodejs.org/en/docs/guides/dont-block-the-event-loop/

Tracking Down and Fixing Performance Bottlenecks

https://nodesource.com/blog/tracking-down-performance-bottlenecks-nsolid-deoptigate

Event Loop Utilization in Node.js

https://nodesource.com/blog/event-loop-utilization-nodejs

Memory Leaks Demystified

https://nodesource.com/blog/memory-leaks-demystified