On Wed, Mar 18, 2015 at 4:43 PM, Danny Dorfman <
wilder...@gmail.com> wrote:
> I have one more question, please: Once the profiler is done, where are the
> results collected?
> How do I get them into an external file for analysis?
You can walk the CpuProfile nodes and write them to disk in
.cpuprofile format, a JSON format that you can import in Chrome
DevTools. It's not documented but it's easy to figure out by looking
at .cpuprofile files written by DevTools.
I have to warn you though that V8 and Chrome are closely coupled with
respect to the file format: it changes frequently and it's not really
designed to be backward- or forward-compatible unless you go through
great contortions.
Our (i.e. StrongLoop's) strong-agent product can write a .cpuprofile
for node.js v0.10 that recent Chromes can understand; I'd link you to
it but it's not open source.