I try to profile my node.js script at CLI.
As written at https://code.google.com/p/v8/wiki/V8Profiler, or http://blog.arc90.com/2012/03/05/profiling-node-programs-on-mac-os-x/ a do:
$ node --prof my_script.js
All ok, I get file named v8.log
with bunch of lines.
But then in inspection tools all go wrong.
$ tools/mac-tick-processor v8.log
show to me
Statistical profiling result from v8.log, (298 ticks, 237 unaccounted, 0 excluded).
and empty JavaScript section.
[JavaScript]:
ticks total nonlib name
Also I try https://github.com/bnoordhuis/node-profiler, but get some results too.
How I can work with --prof results?
$ node -v
v0.8.18
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.7.4
BuildVersion: 11E53
As suggested by @Dogbert you can use github.com/sidorares/node-tick
Feel free to create pull request if you missing any functionality. I haven't updated it for quite a while and it still seems to work
After Node 4.4.0:
node --prof-process isolate-0xnnnnnnnnnnnn-v8.log > processed.txt
From: https://nodejs.org/en/docs/guides/simple-profiling/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With