Ctrlkey in order to Zoom
The steps for Mac and Linux are explained below, but in both cases ensure to run your app with node version
Note: the .cpuprofile files from the Google Chrome DevTools profiler can no longer be loaded directly as a Callgraph since the format changed.
For more info and where to start fixing it please see this issue.
Run your app with DTrace
sudo profile_1ms.d -c 'node --perf-basic-prof <app>' > dtrace.txt
dtrace.txt into the app as well as
Alternatively pipe through cpuprofilify:
cat dtrace.txt | cpuprofilify > dtrace.cpuprofile
and load that into DevTools or the flamegraph app.
One liner for the above:
sudo profile_1ms.d -c 'node --perf-basic-prof <app>' > | cpuprofilify > dtrace.cpuprofile
Make sure to cleanly shutdown your app so the symbols files can be written, see here
Run your app with perf:
perf record -e cycles:u -g -- node --perf-basic-prof app.js
Extract trace from
perf script > perf-script.txt
perf-script.txtfile as the Callgraph suffices since
perfalready resolved the symbols.
Create a cpuprofile with v8-profiler and load that into the app