2

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.

2 Answers 2

3

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.:

Sign up to request clarification or add additional context in comments.

Comments

2

There are two ways for export .cpuprofile:

  • use cli options --cpu-prof
  • use inspector module. See the example usage

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.