Transform Performance Timelines into Chrome Devtools Timelines.
Sapa is available from npm.
npm install sapa
Sapa includes a sapa
command that reads a JSON-encoded Performance Timeline
from stdin
and writes a JSON-encoded Chrome Devtools Timeline to stdout
.
cat performance-timeline.json | node_modules/sapa/bin/sapa > chrome-timeline.json
For an example of using Sapa as a Node module, see /bin/sapa
.
Sapa exports a function from an array of objects implementing the
PerformanceEntry
interface to an array of objects
implementing the TimelineEvent
interface.
var chromeTimeline = require('sapa')(performanceTimeline);
npm test
Sapa is made available under the MIT License.
@pflannery's chrome-timeline-logger was a helpful reference, as were portions of the Blink source and the Chrome Devtools Timeline documentation.