Parse raw trace data into the Chrome DevTools' structured profiling data models
If you use something like big-rig or automated-chrome-profiling you may end up with raw trace data. It's pretty raw. This module will parse that stuff into something a bit more consumable, and should help you with higher level analysis.
$ npm install --save devtools-timeline-modelconst filename = 'demo/mdn-fling.json'
var fs = require('fs')
var events = fs.readFileSync(filename, 'utf8')
const devtoolsTimelineModel = require('devtools-timeline-model');
var model = devtoolsTimelineModel(events)
//=>
model.timelineModel // full event tree
model.irModel // interactions, input, animations
model.frameModel // frames, durations
model.filmStripModel // screenshotsUsing devtool to view the full output:

Type: string or object
Either a string of the trace data or the JSON.parse'd equivalent.
model.timelineModelfull event treemodel.irModelinteractions, input, animationsmodel.frameModelframes, durationsmodel.filmStripModelscreenshots
These objects are huge. You'll want to explore them in a UI like devtool.
Apache © Paul Irish

