-->

Auto record and save chrome developer tools profil

2019-02-25 15:39发布

问题:

Chrome developer tools has an option to Start/Stop Recording profiling data with respect to Memory,Paint,Screenshots,JS Profile on the Timeline tab. Once I refresh a page the recording begins automatically and stops when the page has loaded.

Is there a way to

1)Start this recording in the background automatically without needing to open developer tools in chrome/node-webkit window. Maybe the recording can be enabled via some Chrome API which can be called when the application loads

2)Dump the recorded data into a log file (e.x. a json file) once the recording is over.

Any pointers in the right direction will be appreciated.

回答1:

Found my answer here in the link below. Thanks to @Paul Irish

https://github.com/paulirish/automated-chrome-profiling/blob/master/readme.md#timeline-recording-example