Created
October 7, 2020 23:26
-
-
Save Nooshu/11ecfacdd98f5be12867649564063d91 to your computer and use it in GitHub Desktop.
Extract other important page load metrics from the WebPageTest API
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
#!/usr/bin/env jq -rMf | |
# Extract other metrics from the run data | |
# Headers for resulting CSV | |
["TTFB", "First Contentful Paint", "Start Render", "DOM Complete" , "Fully Loaded"], | |
# drill down into the runs data | |
( | |
.data.runs | |
# convert the run data into an object and drill down into the run request data | |
| to_entries[].value.firstView | |
# build an array of the resulting data we want in the CSV | |
| [.TTFB, .firstContentfulPaint, .render, .domComplete, .fullyLoaded] | |
) | |
# pass to the CSV formatter | |
| @csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment