diff --git a/sql/2023/performance/bfcache_cachecontrol_nostore.sql b/sql/2023/performance/bfcache_cachecontrol_nostore.sql new file mode 100644 index 00000000000..71116136aa2 --- /dev/null +++ b/sql/2023/performance/bfcache_cachecontrol_nostore.sql @@ -0,0 +1,29 @@ +CREATE TEMP FUNCTION HAS_NO_STORE_DIRECTIVE(cache_control STRING) RETURNS BOOL AS ( + REGEXP_CONTAINS(cache_control, r'(?i)\bno-store\b') +); + +WITH requests AS ( + SELECT + client, + LOGICAL_OR(HAS_NO_STORE_DIRECTIVE(JSON_VALUE(payload, '$._cacheControl'))) AS includes_ccns + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' AND + is_main_document + GROUP BY + client, + page +) + +SELECT + client, + COUNTIF(includes_ccns) AS pages, + COUNT(0) AS total, + COUNTIF(includes_ccns) / COUNT(0) AS pct +FROM + requests +GROUP BY + client +ORDER BY + client diff --git a/sql/2023/performance/bfcache_unload.sql b/sql/2023/performance/bfcache_unload.sql new file mode 100644 index 00000000000..8e194a5b9fb --- /dev/null +++ b/sql/2023/performance/bfcache_unload.sql @@ -0,0 +1,31 @@ +WITH lh AS ( + SELECT + client, + page, + rank, + JSON_VALUE(lighthouse, '$.audits.no-unload-listeners.score') = '0' AS has_unload + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + client, + _rank AS rank, + COUNTIF(has_unload) AS pages, + COUNT(0) AS total, + COUNTIF(has_unload) / COUNT(0) AS pct +FROM + lh, + UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS _rank +WHERE + rank <= _rank +GROUP BY + client, + rank +ORDER BY + rank, + client diff --git a/sql/2023/performance/cls_animations.sql b/sql/2023/performance/cls_animations.sql new file mode 100644 index 00000000000..61aaac232eb --- /dev/null +++ b/sql/2023/performance/cls_animations.sql @@ -0,0 +1,28 @@ +WITH lh AS ( + SELECT + client, + ARRAY_LENGTH(JSON_QUERY_ARRAY(lighthouse, '$.audits.non-composited-animations.details.items')) AS num_animations + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + percentile, + client, + APPROX_QUANTILES(num_animations, 1000)[OFFSET(percentile * 10)] AS num_animations, + COUNTIF(num_animations > 0) AS pages, + COUNT(0) AS total, + COUNTIF(num_animations > 0) / COUNT(0) AS pct +FROM + lh, + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/cls_unsized_image_height.sql b/sql/2023/performance/cls_unsized_image_height.sql new file mode 100644 index 00000000000..4c3ad5cef65 --- /dev/null +++ b/sql/2023/performance/cls_unsized_image_height.sql @@ -0,0 +1,27 @@ +WITH lh AS ( + SELECT + client, + CAST(JSON_VALUE(unsized_image, '$.node.boundingRect.height') AS INT64) AS height + FROM + `httparchive.all.pages`, + UNNEST(JSON_QUERY_ARRAY(lighthouse, '$.audits.unsized-images.details.items')) AS unsized_image + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + percentile, + client, + APPROX_QUANTILES(height, 1000)[OFFSET(percentile * 10)] AS height, + COUNT(0) AS unsized_images +FROM + lh, + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/cls_unsized_images.sql b/sql/2023/performance/cls_unsized_images.sql new file mode 100644 index 00000000000..cba6c373a67 --- /dev/null +++ b/sql/2023/performance/cls_unsized_images.sql @@ -0,0 +1,28 @@ +WITH lh AS ( + SELECT + client, + ARRAY_LENGTH(JSON_QUERY_ARRAY(lighthouse, '$.audits.unsized-images.details.items')) AS num_unsized_images + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + percentile, + client, + APPROX_QUANTILES(num_unsized_images, 1000)[OFFSET(percentile * 10)] AS num_unsized_images, + COUNTIF(num_unsized_images > 0) AS pages, + COUNT(0) AS total, + COUNTIF(num_unsized_images > 0) / COUNT(0) AS pct +FROM + lh, + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/inp_long_tasks.sql b/sql/2023/performance/inp_long_tasks.sql new file mode 100644 index 00000000000..61f5697dac3 --- /dev/null +++ b/sql/2023/performance/inp_long_tasks.sql @@ -0,0 +1,36 @@ +WITH long_tasks AS ( + SELECT + client, + page, + ANY_VALUE(httparchive.core_web_vitals.GET_CRUX_INP(payload)) AS inp, + SUM(CAST(JSON_QUERY(item, '$.duration') AS FLOAT64)) AS long_tasks + FROM + `httparchive.all.pages`, + UNNEST(JSON_QUERY_ARRAY(lighthouse, '$.audits.long-tasks.details.items')) AS item + WHERE + date = '2023-10-01' AND + is_root_page + GROUP BY + client, + page +), + +meta AS ( + SELECT + *, + COUNT(0) OVER (PARTITION BY client) AS n, + ROW_NUMBER() OVER (PARTITION BY client ORDER BY inp) AS row + FROM + long_tasks + WHERE + inp IS NOT NULL +) + +SELECT + client, + long_tasks, + inp +FROM + meta +WHERE + MOD(row, CAST(FLOOR(n / 1000) AS INT64)) = 0 diff --git a/sql/2023/performance/inp_tbt.sql b/sql/2023/performance/inp_tbt.sql new file mode 100644 index 00000000000..5175b3a1b80 --- /dev/null +++ b/sql/2023/performance/inp_tbt.sql @@ -0,0 +1,16 @@ +SELECT + percentile, + client, + APPROX_QUANTILES(CAST(JSON_QUERY(lighthouse, '$.audits.total-blocking-time.numericValue') AS FLOAT64), 1000)[OFFSET(percentile * 10)] AS tbt +FROM + `httparchive.all.pages`, + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +WHERE + date = '2023-10-01' AND + is_root_page +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/js_bytes_rank.sql b/sql/2023/performance/js_bytes_rank.sql new file mode 100644 index 00000000000..dbb1cefa266 --- /dev/null +++ b/sql/2023/performance/js_bytes_rank.sql @@ -0,0 +1,17 @@ +SELECT + IF(_rank < 100000000, CAST(_rank AS STRING), 'all') AS rank, + client, + APPROX_QUANTILES(CAST(JSON_VALUE(summary, '$.bytesJS') AS INT64), 1000)[OFFSET(500)] / 1024 AS js_kbytes +FROM + `httparchive.all.pages`, + UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS _rank +WHERE + date = '2023-10-01' AND + is_root_page AND + rank <= _rank +GROUP BY + rank, + client +ORDER BY + rank, + client diff --git a/sql/2023/performance/lcp_bytes_distribution.sql b/sql/2023/performance/lcp_bytes_distribution.sql new file mode 100644 index 00000000000..80eef7ea052 --- /dev/null +++ b/sql/2023/performance/lcp_bytes_distribution.sql @@ -0,0 +1,42 @@ +WITH pages AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +), + +requests AS ( + SELECT + client, + page, + url, + CAST(JSON_VALUE(summary, '$.respSize') AS INT64) / 1024 AS kbytes + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' AND + is_root_page +) + +SELECT + percentile, + client, + APPROX_QUANTILES(kbytes, 1000)[OFFSET(percentile * 10)] AS kbytes +FROM + pages +JOIN + requests +USING + (client, page, url), + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/lcp_bytes_histogram.sql b/sql/2023/performance/lcp_bytes_histogram.sql new file mode 100644 index 00000000000..47be833f630 --- /dev/null +++ b/sql/2023/performance/lcp_bytes_histogram.sql @@ -0,0 +1,43 @@ +WITH pages AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +), + +requests AS ( + SELECT + client, + page, + url, + CAST(JSON_VALUE(summary, '$.respSize') AS INT64) / 1024 AS kbytes + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' AND + is_root_page +) + +SELECT + client, + IF(CEILING(kbytes / 100) * 100 < 1000, CAST(CEILING(kbytes / 100) * 100 AS STRING), '1000+') AS kbytes, + COUNT(0) AS freq, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + pages +JOIN + requests +USING + (client, page, url) +GROUP BY + client, + kbytes +ORDER BY + client, + kbytes diff --git a/sql/2023/performance/lcp_element_data.sql b/sql/2023/performance/lcp_element_data.sql new file mode 100644 index 00000000000..44859802e0b --- /dev/null +++ b/sql/2023/performance/lcp_element_data.sql @@ -0,0 +1,129 @@ +CREATE TEMP FUNCTION getLoadingAttr(attributes STRING) RETURNS STRING LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const loadingAttr = data.find(attr => attr["name"] === "loading") + return loadingAttr.value + } catch (e) { + return ""; + } +'''; + +CREATE TEMP FUNCTION getDecodingAttr(attributes STRING) RETURNS STRING LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const decodingAttr = data.find(attr => attr["name"] === "decoding") + return decodingAttr.value + } catch (e) { + return ""; + } +'''; + +CREATE TEMP FUNCTION getFetchPriorityAttr(attributes STRING) RETURNS STRING LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const fetchPriorityAttr = data.find(attr => attr["name"] === "fetchpriority") + return fetchPriorityAttr.value + } catch (e) { + return ""; + } +'''; + +CREATE TEMP FUNCTION getLoadingClasses(attributes STRING) RETURNS STRING LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const classes = data.find(attr => attr["name"] === "class").value + if (classes.indexOf('lazyload') !== -1) { + return classes + } else { + return "" + } + } catch (e) { + return ""; + } +'''; + +CREATE TEMPORARY FUNCTION getResourceHints(payload STRING) +RETURNS STRUCT +LANGUAGE js AS ''' +var hints = ['preload', 'prefetch', 'preconnect', 'prerender', 'dns-prefetch', 'modulepreload']; +try { + var $ = JSON.parse(payload); + var almanac = JSON.parse($.almanac); + return hints.reduce((results, hint) => { + results[hint] = !!almanac['link-nodes'].nodes.find(link => link.rel.toLowerCase() == hint); + return results; + }, {}); +} catch (e) { + return hints.reduce((results, hint) => { + results[hint] = false; + return results; + }, {}); +} +'''; + + +WITH lcp_stats AS ( + SELECT + client, + page, + JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.nodeName') AS nodeName, + JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.url') AS elementUrl, + CAST(JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.size') AS INT64) AS size, + CAST(JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.loadTime') AS FLOAT64) AS loadTime, + CAST(JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.startTime') AS FLOAT64) AS startTime, + CAST(JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.renderTime') AS FLOAT64) AS renderTime, + JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes') AS attributes, + getLoadingAttr(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS loading, + getDecodingAttr(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS decoding, + getLoadingClasses(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS classWithLazyload, + getFetchPriorityAttr(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS fetchPriority, + getResourceHints(custom_metrics) AS hints + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + +SELECT + client, + nodeName, + COUNT(DISTINCT page) AS pages, + ANY_VALUE(total) AS total, + COUNT(DISTINCT page) / ANY_VALUE(total) AS pct, + COUNTIF(elementUrl != '') AS haveImages, + COUNTIF(elementUrl != '') / COUNT(DISTINCT page) AS pct_haveImages, + COUNTIF(loading = 'eager') AS native_eagerload, + COUNTIF(loading = 'lazy') AS native_lazyload, + COUNTIF(classWithLazyload != '') AS lazyload_class, + COUNTIF(classWithLazyload != '' OR loading = 'lazy') AS probably_lazyLoaded, + COUNTIF(classWithLazyload != '' OR loading = 'lazy') / COUNT(DISTINCT page) AS pct_prob_lazyloaded, + COUNTIF(decoding = 'async') AS async_decoding, + COUNTIF(decoding = 'sync') AS sync_decoding, + COUNTIF(decoding = 'auto') AS auto_decoding, + COUNTIF(fetchPriority = 'low') AS priority_low, + COUNTIF(fetchPriority = 'high') AS priority_high, + COUNTIF(hints.preload) AS preload, + COUNTIF(hints.preload) / COUNT(0) AS pct_preload +FROM + lcp_stats +JOIN ( + SELECT + client, + COUNT(0) AS total + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page + GROUP BY + client) +USING + (client) +GROUP BY + client, + nodeName +HAVING + pages > 1000 +ORDER BY + pct DESC diff --git a/sql/2023/performance/lcp_format.sql b/sql/2023/performance/lcp_format.sql new file mode 100644 index 00000000000..61aba286ce1 --- /dev/null +++ b/sql/2023/performance/lcp_format.sql @@ -0,0 +1,42 @@ +WITH pages AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +), + +requests AS ( + SELECT + client, + page, + url, + JSON_VALUE(summary, '$.format') AS format + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' AND + is_root_page +) + +SELECT + client, + format, + COUNT(0) AS freq, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + pages +JOIN + requests +USING + (client, page, url) +GROUP BY + client, + format +ORDER BY + pct DESC diff --git a/sql/2023/performance/lcp_host.sql b/sql/2023/performance/lcp_host.sql new file mode 100644 index 00000000000..6f051899a56 --- /dev/null +++ b/sql/2023/performance/lcp_host.sql @@ -0,0 +1,29 @@ +WITH lcp AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + client, + CASE + WHEN NET.HOST(url) = 'data' THEN 'other content' + WHEN NET.HOST(url) IS NULL THEN 'other content' + WHEN NET.HOST(page) = NET.HOST(url) THEN 'same host' + ELSE 'cross host' + END AS lcp_same_host, + COUNT(0) AS pages, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + lcp +GROUP BY + client, + lcp_same_host diff --git a/sql/2023/performance/lcp_host_3p.sql b/sql/2023/performance/lcp_host_3p.sql new file mode 100644 index 00000000000..ae84efc1196 --- /dev/null +++ b/sql/2023/performance/lcp_host_3p.sql @@ -0,0 +1,31 @@ +WITH lcp AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + client, + NET.REG_DOMAIN(url) AS lcp_domain, + COUNT(0) AS pages, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + lcp +WHERE + NET.HOST(page) != NET.HOST(url) AND + NET.HOST(url) != 'data' +GROUP BY + client, + lcp_domain +ORDER BY + pct DESC +LIMIT + 25 diff --git a/sql/2023/performance/lcp_initiator_type.sql b/sql/2023/performance/lcp_initiator_type.sql new file mode 100644 index 00000000000..29596bbbf32 --- /dev/null +++ b/sql/2023/performance/lcp_initiator_type.sql @@ -0,0 +1,43 @@ +WITH lcp AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_resource.initiator.url') AS url, + JSON_VALUE(custom_metrics, '$.performance.is_lcp_statically_discoverable') = 'false' AS not_discoverable + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +), + +requests AS ( + SELECT + client, + page, + url, + type + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' +) + + +SELECT + client, + IFNULL(type, 'unknown') AS lcp_initiator_type, + COUNTIF(not_discoverable) AS pages, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNTIF(not_discoverable) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + lcp +LEFT JOIN + requests +USING + (client, page, url) +GROUP BY + client, + type +ORDER BY + pct DESC diff --git a/sql/2023/performance/lcp_lazy.sql b/sql/2023/performance/lcp_lazy.sql new file mode 100644 index 00000000000..86d0a6fb8b4 --- /dev/null +++ b/sql/2023/performance/lcp_lazy.sql @@ -0,0 +1,47 @@ +CREATE TEMP FUNCTION isLazyLoaded(attributes STRING) RETURNS BOOLEAN LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const loadingAttr = data.find(attr => attr["name"] === "loading") + return loadingAttr.value == 'lazy' + } catch (e) { + return null; + } +'''; + +CREATE TEMP FUNCTION hasLazyHeuristics(attributes STRING) RETURNS BOOLEAN LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const classes = data.find(attr => attr["name"] === "class").value; + const hasLazyClasses = classes.indexOf('lazyload') !== -1; + const hasLazySrc = data.includes(attr => attr["name"] === "data-src"); + + return hasLazyClasses || hasLazySrc; + } catch (e) { + return false; + } +'''; + +WITH lcp_stats AS ( + SELECT + client, + isLazyLoaded(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS native_lazy, + hasLazyHeuristics(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS custom_lazy + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page AND + JSON_EXTRACT_SCALAR(custom_metrics, '$.performance.lcp_elem_stats.nodeName') = 'IMG' +) + +SELECT + client, + COUNT(0) AS total, + COUNTIF(native_lazy) / COUNT(0) AS pct_native_lazy, + COUNTIF(custom_lazy) / COUNT(0) AS pct_custom_lazy, + COUNTIF(custom_lazy OR native_lazy) / COUNT(0) AS pct_either_lazy, + COUNTIF(custom_lazy AND native_lazy) / COUNT(0) AS pct_both_lazy +FROM + lcp_stats +GROUP BY + client diff --git a/sql/2023/performance/lcp_lazy_technologies.sql b/sql/2023/performance/lcp_lazy_technologies.sql new file mode 100644 index 00000000000..40509f07e45 --- /dev/null +++ b/sql/2023/performance/lcp_lazy_technologies.sql @@ -0,0 +1,75 @@ +CREATE TEMP FUNCTION isLazyLoaded(attributes STRING) RETURNS BOOLEAN LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const loadingAttr = data.find(attr => attr["name"] === "loading") + return loadingAttr.value == 'lazy' + } catch (e) { + return null; + } +'''; + +CREATE TEMP FUNCTION hasLazyHeuristics(attributes STRING) RETURNS BOOLEAN LANGUAGE js AS ''' + try { + const data = JSON.parse(attributes); + const classes = data.find(attr => attr["name"] === "class").value; + const hasLazyClasses = classes.indexOf('lazyload') !== -1; + const hasLazySrc = data.includes(attr => attr["name"] === "data-src"); + + return hasLazyClasses || hasLazySrc; + } catch (e) { + return false; + } +'''; + +WITH lazy_tech AS ( + SELECT + client, + page, + isLazyLoaded(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS native_lazy, + hasLazyHeuristics(JSON_EXTRACT(custom_metrics, '$.performance.lcp_elem_stats.attributes')) AS custom_lazy, + t.technology AS technology + FROM + `httparchive.all.pages`, + UNNEST(technologies) AS t + WHERE + date = '2023-10-01' AND + is_root_page +), + +tech_totals AS ( + SELECT + client, + technology, + COUNT(0) AS pages_per_technology + FROM + lazy_tech + GROUP BY + client, + technology +) + + +SELECT + client, + technology, + COUNTIF(native_lazy) AS native_lazy, + COUNTIF(custom_lazy) AS custom_lazy, + COUNTIF(native_lazy OR custom_lazy) AS either_lazy, + COUNT(0) AS pages, + COUNTIF(native_lazy) / COUNT(0) AS pct_native_lazy, + COUNTIF(custom_lazy) / COUNT(0) AS pct_custom_lazy, + COUNTIF(native_lazy OR custom_lazy) / COUNT(0) AS pct_either_lazy +FROM + lazy_tech +JOIN + tech_totals +USING + (client, technology) +GROUP BY + client, + technology +HAVING + pages > 1000 AND + pct_either_lazy > 0.1 +ORDER BY + either_lazy DESC diff --git a/sql/2023/performance/lcp_preload_discoverable.sql b/sql/2023/performance/lcp_preload_discoverable.sql new file mode 100644 index 00000000000..8641e593751 --- /dev/null +++ b/sql/2023/performance/lcp_preload_discoverable.sql @@ -0,0 +1,28 @@ +WITH lcp AS ( + SELECT + client, + JSON_VALUE(custom_metrics, '$.performance.is_lcp_statically_discoverable') = 'true' AS discoverable, + JSON_VALUE(custom_metrics, '$.performance.is_lcp_preloaded') = 'true' AS preloaded + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + client, + discoverable, + preloaded, + COUNT(0) AS pages, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + lcp +GROUP BY + client, + discoverable, + preloaded +ORDER BY + pct DESC diff --git a/sql/2023/performance/lcp_resource_load_delay.sql b/sql/2023/performance/lcp_resource_load_delay.sql new file mode 100644 index 00000000000..19221b658ed --- /dev/null +++ b/sql/2023/performance/lcp_resource_load_delay.sql @@ -0,0 +1,53 @@ +WITH pages AS ( + SELECT + client, + page, + JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url') AS url, + httparchive.core_web_vitals.GET_LAB_TTFB(payload) AS ttfb + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +), + +requests AS ( + SELECT + client, + page, + url, + CAST(JSON_QUERY(payload, '$._created') AS FLOAT64) AS lcp_req_time + FROM + `httparchive.all.requests` + WHERE + date = '2023-10-01' AND + is_root_page +), + +delays AS ( + SELECT + client, + CAST(lcp_req_time - ttfb AS INT64) AS lcp_resource_load_delay + FROM + pages + JOIN + requests + USING + (client, page, url) + WHERE + lcp_req_time > ttfb +) + +SELECT + percentile, + client, + APPROX_QUANTILES(lcp_resource_load_delay, 1000)[OFFSET(percentile * 10)] AS lcp_resource_load_delay +FROM + delays, + UNNEST([10, 25, 50, 75, 90]) AS percentile +GROUP BY + percentile, + client +ORDER BY + percentile, + client diff --git a/sql/2023/performance/lcp_resource_type.sql b/sql/2023/performance/lcp_resource_type.sql new file mode 100644 index 00000000000..06d7471cc57 --- /dev/null +++ b/sql/2023/performance/lcp_resource_type.sql @@ -0,0 +1,31 @@ +WITH lcp AS ( + SELECT + client, + page, + # Parse anchors out of LCP URLs. + REGEXP_EXTRACT(JSON_VALUE(custom_metrics, '$.performance.lcp_elem_stats.url'), r'([^#]*)') AS url + FROM + `httparchive.all.pages` + WHERE + date = '2023-10-01' AND + is_root_page +) + + +SELECT + client, + CASE + WHEN lcp.url = '' THEN 'text' + WHEN STARTS_WITH(lcp.url, 'data:') THEN 'inline image' + ELSE 'image' + END AS lcp_type, + COUNT(0) AS pages, + SUM(COUNT(0)) OVER (PARTITION BY client) AS total, + COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct +FROM + lcp +GROUP BY + client, + lcp_type +ORDER BY + pct DESC diff --git a/sql/2023/performance/lcp_responsive_data.sql b/sql/2023/performance/lcp_responsive_data.sql new file mode 100644 index 00000000000..951023dd6f5 --- /dev/null +++ b/sql/2023/performance/lcp_responsive_data.sql @@ -0,0 +1,59 @@ +CREATE TEMP FUNCTION checkResponsiveImages(responsivelist STRING, lcpImgUrl STRING, nodePath STRING) RETURNS BOOLEAN LANGUAGE js AS ''' + try { + //we will check lcp elment is img + const lastSegment = (nodePath.split(",").reverse())[0]; + let lastNodeImg = false + if(lastSegment == 'IMG'){ + lastNodeImg = true + } + if(lcpImgUrl != null && lastNodeImg){ + const listJson = JSON.parse(responsivelist); + if(listJson.length > 0){ + for(let i=0;i= 0.75 +); + +CREATE TEMP FUNCTION IS_NI (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + SAFE_DIVIDE(good, (good + needs_improvement + poor)) < 0.75 AND + SAFE_DIVIDE(poor, (good + needs_improvement + poor)) < 0.25 +); + +CREATE TEMP FUNCTION IS_POOR (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + SAFE_DIVIDE(poor, (good + needs_improvement + poor)) >= 0.25 +); + +CREATE TEMP FUNCTION IS_NON_ZERO (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + good + needs_improvement + poor > 0 +); + +WITH +base AS ( + SELECT + date, + origin, + device, + + fast_fid, + avg_fid, + slow_fid, + + fast_inp, + avg_inp, + slow_inp, + + fast_lcp, + avg_lcp, + slow_lcp, + + small_cls, + medium_cls, + large_cls, + + fast_fcp, + avg_fcp, + slow_fcp, + + fast_ttfb, + avg_ttfb, + slow_ttfb + + FROM + `chrome-ux-report.materialized.device_summary` + WHERE + device IN ('desktop', 'phone') AND + date IN ('2020-08-01', '2021-07-01', '2022-06-01', '2023-09-01') +) + +SELECT + date, + device, + + COUNT(DISTINCT origin) AS total_origins, + + # Good CWV with optional FID + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fid, avg_fid, slow_fid) IS NOT FALSE AND + IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cwv23_good, + + # Good CWV with optional INP + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_inp, avg_inp, slow_inp) IS NOT FALSE AND + IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cwv24_good, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_poor + +FROM + base +GROUP BY + date, + device diff --git a/sql/2023/performance/web_vitals_by_rank_and_device.sql b/sql/2023/performance/web_vitals_by_rank_and_device.sql new file mode 100644 index 00000000000..0d7d14bc6ae --- /dev/null +++ b/sql/2023/performance/web_vitals_by_rank_and_device.sql @@ -0,0 +1,190 @@ +CREATE TEMP FUNCTION IS_GOOD (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + SAFE_DIVIDE(good, (good + needs_improvement + poor)) >= 0.75 +); + +CREATE TEMP FUNCTION IS_POOR (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + SAFE_DIVIDE(poor, (good + needs_improvement + poor)) >= 0.25 +); + +CREATE TEMP FUNCTION IS_NI (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + NOT IS_GOOD(good, needs_improvement, poor) AND + NOT IS_POOR(good, needs_improvement, poor) +); + +CREATE TEMP FUNCTION IS_NON_ZERO (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( + good + needs_improvement + poor > 0 +); + +WITH +base AS ( + SELECT + date, + origin, + device, + rank, + + fast_fid, + avg_fid, + slow_fid, + + fast_inp, + avg_inp, + slow_inp, + + fast_lcp, + avg_lcp, + slow_lcp, + + small_cls, + medium_cls, + large_cls, + + fast_fcp, + avg_fcp, + slow_fcp, + + fast_ttfb, + avg_ttfb, + slow_ttfb + + FROM + `chrome-ux-report.materialized.device_summary` + WHERE + device IN ('desktop', 'phone') AND + date IN ('2022-06-01', '2023-09-01') +) + +SELECT + date, + device, + rank_grouping AS ranking, + + COUNT(DISTINCT origin) AS total_origins, + + # Good CWV with optional FID + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fid, avg_fid, slow_fid) IS NOT FALSE AND + IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cwv23_good, + + # Good CWV with optional INP + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_inp, avg_inp, slow_inp) IS NOT FALSE AND + IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cwv24_good, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_lcp, avg_lcp, slow_lcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))) AS pct_lcp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_fid, avg_fid, slow_fid), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fid, avg_fid, slow_fid), origin, NULL))) AS pct_fid_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_inp, avg_inp, slow_inp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))) AS pct_inp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(small_cls, medium_cls, large_cls), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))) AS pct_cls_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_fcp, avg_fcp, slow_fcp), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_fcp, avg_fcp, slow_fcp), origin, NULL))) AS pct_fcp_poor, + + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_GOOD(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_good, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_NI(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_ni, + SAFE_DIVIDE( + COUNT(DISTINCT IF( + IS_POOR(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL)), + COUNT(DISTINCT IF( + IS_NON_ZERO(fast_ttfb, avg_ttfb, slow_ttfb), origin, NULL))) AS pct_ttfb_poor + +FROM + base, + UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS rank_grouping +WHERE + rank <= rank_grouping +GROUP BY + date, + device, + rank_grouping +ORDER BY + rank_grouping diff --git a/sql/2024/accessibility/README.md b/sql/2024/accessibility/README.md new file mode 100644 index 00000000000..89f1de5fdc7 --- /dev/null +++ b/sql/2024/accessibility/README.md @@ -0,0 +1,20 @@ +# 2024 Accessibility queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1anCSQk9g_YDfZP6GtjqdC-vCfnCNZAUEQwjSr8AzqTw/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1btB1r9QpdgTyToPhn7glcGAdMFs7eq4UcQSVIHBqiYQ/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/accessibility.md diff --git a/sql/2024/caching/README.md b/sql/2024/caching/README.md new file mode 100644 index 00000000000..ac0dae21385 --- /dev/null +++ b/sql/2024/caching/README.md @@ -0,0 +1,20 @@ +# 2024 Caching queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/19nHfMkAxIYBPoPfnH8xmq1KP4mHH59z_RVgtF_UT8KU/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1XxN2xIrJk2YffeqhlWuNjPPrt5rT7uoi4BxM4gCFhvk/edit#gid=1137634974 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/caching.md diff --git a/sql/2024/capabilities/README.md b/sql/2024/capabilities/README.md new file mode 100644 index 00000000000..d0724fc84fc --- /dev/null +++ b/sql/2024/capabilities/README.md @@ -0,0 +1,20 @@ +# 2024 Capabilities queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1YgvVNPicdrqsxccrk64jdDusbHPjbPcIYKnsmXW9BwM/edit +[~google-sheets]:https://docs.google.com/spreadsheets/d/1Ig-821tyjr897i8QqPvXiRMY9o444qsFAmZt4AFyBjk/edit#gid=0 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/capabilities.md diff --git a/sql/2024/cdn/README.md b/sql/2024/cdn/README.md new file mode 100644 index 00000000000..acb7de7292d --- /dev/null +++ b/sql/2024/cdn/README.md @@ -0,0 +1,26 @@ +# 2024 CDN queries + + + +Query updates: +- Dates have been updated + + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/11Yz8S-e3ltbYQPdzKX1E3oexfA2PwWLdA5tToDv98BI/edit +[~google-sheets]:https://docs.google.com/spreadsheets/d/15YXQQjyoQ0Bnfw9KNSz_YuGDiCfW978_WKEHvDXjdm4/edit#gid=745368492 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/cdn.md diff --git a/sql/2024/cms/README.md b/sql/2024/cms/README.md new file mode 100644 index 00000000000..f7c620a1d37 --- /dev/null +++ b/sql/2024/cms/README.md @@ -0,0 +1,20 @@ +# 2024 CMS queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/13CxAp7HCcxHHCSuEnXS2rolKskLSlUvLQuqUD6QADYc/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/118lwQV_GwFYqIxXvsm57oeadJdjAJEOMCRq1PsTqhfs/edit#gid=355498918 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/cms.md diff --git a/sql/2024/compression/README.md b/sql/2024/compression/README.md new file mode 100644 index 00000000000..784036c9a25 --- /dev/null +++ b/sql/2024/compression/README.md @@ -0,0 +1,29 @@ +# 2024 Compression queries + + + +Queries: +* Content types using HTTP compression +* Server settings for HTTP compression. (http vs https) +* Trends in HTTP compression (4 year trend) +* First vs Third Party compression +* Lighthouse compression byte savings +* Lighthouse compression scores + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/13DsZfvQIWVa668pJMFtW8gL-uAlt9TjGCbgVcCdgN0Y/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1LihF3OD7Uq4A9cynpTntsOeD2ZN7cTSErsyNyWjuy2Y/edit#gid=1369271609 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/compression.md diff --git a/sql/2024/cookies/README.md b/sql/2024/cookies/README.md new file mode 100644 index 00000000000..26eec974e5f --- /dev/null +++ b/sql/2024/cookies/README.md @@ -0,0 +1,20 @@ +# 2024 Cookies queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1o2AgdsDq_x3OvthZF7Kb50rUKMVLn7UANT9Stz7ku2I/edit#heading=h.ymg495uvm3yx +[~google-sheets]: https://docs.google.com/spreadsheets/d/1wDGnUkO0rgcU5_V6hmUrhm1pq60VU2XbeMHgYJEEaSM/edit#gid=454016814 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/cookies.md diff --git a/sql/2024/css/README.md b/sql/2024/css/README.md new file mode 100644 index 00000000000..0743d12118c --- /dev/null +++ b/sql/2024/css/README.md @@ -0,0 +1,20 @@ +# 2024 CSS queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1hMRUNA862CypoKXjRcQtZJpCDpb16jUSAIR6Nm2uWwE/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1R40dZYFdszjciIpS2jFMC3mPpZC-xHJnEE42xTEVY2w/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/css.md diff --git a/sql/2024/ecommerce/README.md b/sql/2024/ecommerce/README.md new file mode 100644 index 00000000000..94a780234ae --- /dev/null +++ b/sql/2024/ecommerce/README.md @@ -0,0 +1,22 @@ +# 2024 Ecommerce queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1wWCadW1fIlRhzQWxLFhu6fKbXiwuewr2JdIMijYh2Ds/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1LABlisQFCLjOyEd43tdUb-Hxs6pGuboTresntMk71Lc/edit#gid=1075995078 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/ecommerce.md + + diff --git a/sql/2024/fonts/README.md b/sql/2024/fonts/README.md new file mode 100644 index 00000000000..5919175e6c3 --- /dev/null +++ b/sql/2024/fonts/README.md @@ -0,0 +1,20 @@ +# 2024 Fonts queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1ljEHbDvXComXnW5s_EXZ0nM3_JCLnYr28Xrcf0YYtP8/edit#heading=h.vp0ukb2pxxzp +[~google-sheets]: https://docs.google.com/spreadsheets/d/1EkdvJ8e0B9Rr42evC2Ds5Ekwq6gF9oLBW0BA5cmSUT4/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/fonts.md diff --git a/sql/2024/http/README.md b/sql/2024/http/README.md new file mode 100644 index 00000000000..ca68c6aa3f7 --- /dev/null +++ b/sql/2024/http/README.md @@ -0,0 +1,20 @@ +# 2024 HTTP queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1-vPF7GivpV-fbdj8VE6GaMpb1BJHGxLvK2ElBtc_0ls/edit +[~google-sheets]:https://docs.google.com/spreadsheets/d/1PfTZkbmgyLA3NmEICeCyxpMWgP7cKY7EsZl9RciE5S4/edit#gid=140668849 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/http.md diff --git a/sql/2024/interoperability/README.md b/sql/2024/interoperability/README.md new file mode 100644 index 00000000000..bf23f765a04 --- /dev/null +++ b/sql/2024/interoperability/README.md @@ -0,0 +1,20 @@ +# 2024 Interoperability queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/15leFm5uN-SE_biA1eyOwzQI69Ybl_2OvcN6u0lysjuo/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1IlG_RbYue60RkdA4-ZeDA3u_mHn9cpM8VM6J66CS4bM/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/interop.md diff --git a/sql/2024/jamstack/README.md b/sql/2024/jamstack/README.md new file mode 100644 index 00000000000..0cd74126803 --- /dev/null +++ b/sql/2024/jamstack/README.md @@ -0,0 +1,20 @@ +# 2024 Jamstack queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/17nSxLz18zVQBLTbo2NTIfaLmEPKrDl0MfltRjE1v6vI/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1wKswSnp8TuN4aZb63ir7hE5eCikIu8zEdQYPp4Xo6O0/edit#gid=807625051 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/jamstack.md diff --git a/sql/2024/javascript/README.md b/sql/2024/javascript/README.md new file mode 100644 index 00000000000..a20c5f5cd95 --- /dev/null +++ b/sql/2024/javascript/README.md @@ -0,0 +1,20 @@ +# 2024 JavaScript queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1pGEUO47dYsob45oic_yXWP5neBHzNVN_B5pwlSg8bqA/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/16isMe5_rvmRmJHtK5Je66AhwO8SowGgq0EFqXyjEXw8/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/javascript.md diff --git a/sql/2024/markup/README.md b/sql/2024/markup/README.md new file mode 100644 index 00000000000..351c070b4e6 --- /dev/null +++ b/sql/2024/markup/README.md @@ -0,0 +1,20 @@ +# 2024 Markup queries + + + +## Resources + +- [πŸ“„ Planning doc][~google-doc] +- [πŸ“Š Results sheet][~google-sheets] +- [πŸ“ Markdown file][~chapter-markdown] + +[~google-doc]: https://docs.google.com/document/d/1jml04hWOXy2RYvlQoE6IbjB946obwX5X_t0ZgTZA9qg/edit +[~google-sheets]: https://docs.google.com/spreadsheets/d/1TtOMr_w58HvqNBv4RIWX021Lxm6m5ajYOcRykrPdAJc/edit#gid=1778117656 +[~chapter-markdown]: https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/src/content/en/2024/markup.md diff --git a/sql/2024/media/README.md b/sql/2024/media/README.md new file mode 100644 index 00000000000..e2758712217 --- /dev/null +++ b/sql/2024/media/README.md @@ -0,0 +1,54 @@ +# 2024 Media queries + + + +## Notes for 2024 + +2021’s analysis was largely done on custom metrics, which work on what they can see using JS APIs, in the DOM. As such, we worked primarily looked at `` and `