Created
July 25, 2021 17:10
-
-
Save Drag13/d3ef418734736a662d3aedfc2a33fa0c to your computer and use it in GitHub Desktop.
Returns list of render blocking resources from the Chrome trace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { readFileSync } = require("fs"); | |
const rawData = readFileSync('./data.json'); | |
const data = JSON.parse(rawData); | |
const res = data | |
.filter(x => x.args?.data?.renderBlocking) | |
.map(x => ({ | |
timestamp: new Date(x.ts), | |
url: x.args.data.url, | |
priority: x.args.data.priority, | |
blocking: x.args.data.renderBlocking, | |
})); | |
console.log(res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment