I'm working on this tool "ntop" to be able to quickly see the heaviest functions in any running Node process like "top" command for regular processes in Linux. The initial version required code changes but now it's working with just CLI (Linux only first)
npm i -g ntop
ntop inject 12345 // where 12345 is process id
ntop 12345
Prints:
Profiling client node-proc-3150 time 3000
(garbage collector) | 11.703ms |
utils.bulkPreparePacket | 1.53ms | file:///home/app/src/Utils.js:91:26
(anonymous) | 1.181ms | evalmachine.:3:14
(anonymous) | 1.126ms | file:///home/app/node_modules/lodash/lodash.js:1223:19
https://github.com/DVLP/ntop/