There are a few tools and ways out there:
node --prof ./app.js
node --prof-process ./the-generated-log-file
- 0x
- jam3/devtool then Chrome Developer Tools Flame Charts
- Dtrace and StackVis — Only supported on SmartOS
Libraries that output debugging information
Libraries that enhance stack trace information
- Apache Bench:
ab -n 100000 -c 1 http://127.0.0.1:9778/
- wrk
These use to work but are no longer maintained or applicable to recent node versions.
- https://github.com/bnoordhuis/node-profiler - replaced by built-in debugging
- https://github.com/c4milo/node-webkit-agent - replaced by node inspector
- https://nodetime.com/ - defunct