Skip to content

Instantly share code, notes, and snippets.

@patrickhulce
Created July 18, 2018 16:15
Show Gist options
  • Save patrickhulce/ea9d10a934fb079ea1c70cad30982936 to your computer and use it in GitHub Desktop.
Save patrickhulce/ea9d10a934fb079ea1c70cad30982936 to your computer and use it in GitHub Desktop.
HTTP Archive Lighthouse Queries
/* Get the distribution of performance scores */
SELECT
QUANTILES(FLOAT(JSON_EXTRACT_SCALAR(report, '$.categories.performance.score')), 21)
FROM
[httparchive:lighthouse.2018_07_01_mobile]
WHERE
report != 'null'
AND JSON_EXTRACT(report, '$.categories.performance.score') != 'null'
/* Get the distribution of FCP values */
SELECT
QUANTILES(FLOAT(JSON_EXTRACT_SCALAR(report, '$.audits.first-contentful-paint.rawValue')), 21)
FROM
[httparchive:lighthouse.2018_07_01_mobile]
WHERE
report != 'null'
AND JSON_EXTRACT(report, '$.audits.first-contentful-paint.rawValue') != 'null'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment