Reputation: 1895
According to Node.js documentation profiling info can be generated using node --prof myapp.js
.
Is there a way to convert from this generated format to Chrome's Dev Tools performance profile? It expects to load a JSON format while the format generated by node --prof
is not JSON.
Upvotes: 2
Views: 3030
Reputation: 616
There are two ways for export .cpuprofile
:
--cpu-prof
inspector
module. See the example usageUpvotes: 2
Reputation: 40501
No, the output generated by the --prof
flag is not what DevTools expects, and AFAIK there's no way to convert it.
However, there is also the --inspect
flag, allowing you to use DevTools with Node, including profiling. I haven't tried it myself, but a quick search turns up e.g.:
Upvotes: 3