-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lh audits linear correlated with cwv
- Loading branch information
1 parent
4a9d18c
commit 2c8302e
Showing
2 changed files
with
160 additions
and
1 deletion.
There are no files selected for viewing
158 changes: 158 additions & 0 deletions
158
sql/2021/performance/lighthouse_audits_corr_with_cwv.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# standardSQL | ||
# Correlation between various lighthouse audits and core web vitals | ||
|
||
SELECT | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.server-response-time.numericValue') AS FLOAT64)) AS first_contentful_paint_on_server_response_time_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.render-blocking-resources.numericValue') AS FLOAT64)) AS first_contentful_paint_on_render_blocking_resources_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.redirects.numericValue') AS FLOAT64)) AS first_contentful_paint_on_redirects_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.critical-request-chains.numericValue') AS FLOAT64)) AS first_contentful_paint_on_critical_request_chains_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-text-compression.numericValue') AS FLOAT64)) AS first_contentful_paint_on_uses_text_compression_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-rel-preconnect.numericValue') AS FLOAT64)) AS first_contentful_paint_on_uses_rel_preconnect_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-rel-preload.numericValue') AS FLOAT64)) AS first_contentful_paint_on_uses_rel_preload_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.font-display.numericValue') AS FLOAT64)) AS first_contentful_paint_on_font_display_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unminified-javascript.numericValue') AS FLOAT64)) AS first_contentful_paint_on_unminified_javascript_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unminified-css.numericValue') AS FLOAT64)) AS first_contentful_paint_on_unminified_css_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.first-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unused-css-rules.numericValue') AS FLOAT64)) AS first_contentful_paint_on_unused_css_rules_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.server-response-time.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_server_response_time_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.render-blocking-resources.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_render_blocking_resources_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.redirects.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_redirects_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.critical-request-chains.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_critical_request_chains_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-text-compression.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_uses_text_compression_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-rel-preconnect.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_uses_rel_preconnect_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.uses-rel-preload.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_uses_rel_preload_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.font-display.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_font_display_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unminified-javascript.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_unminified_javascript_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unminified-css.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_unminified_css_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unused-css-rules.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_unused_css_rules_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint-element.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_largest_contentful_paint_element_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.preload-lcp-image.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_preload_lcp_image_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unused-javascript.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_unused_javascript_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.efficient-animated-content.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_efficient_animated_content_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.largest-contentful-paint.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.total-byte-weight.numericValue') AS FLOAT64)) AS largest_contentful_paint_on_total_byte_weight_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.long-tasks.numericValue') AS FLOAT64)) AS total_blocking_time_on_long_tasks_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.third-party-summary.numericValue') AS FLOAT64)) AS total_blocking_time_on_third_party_summary_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.third-party-facades.numericValue') AS FLOAT64)) AS total_blocking_time_on_third_party_facades_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.bootup-time.numericValue') AS FLOAT64)) AS total_blocking_time_on_bootup_time_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.mainthread-work-breakdown.numericValue') AS FLOAT64)) AS total_blocking_time_on_mainthread_work_breakdown_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.dom-size.numericValue') AS FLOAT64)) AS total_blocking_time_on_dom_size_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.duplicated-javascript.numericValue') AS FLOAT64)) AS total_blocking_time_on_duplicated_javascript_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.total-blocking-time.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.legacy-javascript.numericValue') AS FLOAT64)) AS total_blocking_time_on_legacy_javascript_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.cumulative-layout-shift.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.layout-shift-elements.numericValue') AS FLOAT64)) AS cumulative_layout_shift_on_layout_shift_elements_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.cumulative-layout-shift.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.non-composited-animations.numericValue') AS FLOAT64)) AS cumulative_layout_shift_on_non_composited_animations_score, | ||
CORR(CAST(JSON_QUERY(report, | ||
'$.audits.cumulative-layout-shift.numericValue') AS FLOAT64), | ||
CAST(JSON_QUERY(report, | ||
'$.audits.unsized-images.numericValue') AS FLOAT64)) AS cumulative_layout_shift_on_unsized_images_score | ||
FROM | ||
`httparchive.sample_data.lighthouse_mobile_10k` |
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