From 6295468e7dd2f199c1fa3304d8d655f6b49da0be Mon Sep 17 00:00:00 2001 From: Rick Viscomi Date: Wed, 15 May 2024 10:29:47 -0400 Subject: [PATCH 01/14] 2023 Performance (#3525) * cp 2022->2023 * 2023ify * 2023/perf * lint * lint * fix initiator * null initiators --- .../bfcache_cachecontrol_nostore.sql | 29 +++ sql/2023/performance/bfcache_unload.sql | 31 +++ sql/2023/performance/cls_animations.sql | 28 +++ .../performance/cls_unsized_image_height.sql | 27 +++ sql/2023/performance/cls_unsized_images.sql | 28 +++ sql/2023/performance/inp_long_tasks.sql | 36 ++++ sql/2023/performance/inp_tbt.sql | 16 ++ sql/2023/performance/js_bytes_rank.sql | 17 ++ .../performance/lcp_bytes_distribution.sql | 42 ++++ sql/2023/performance/lcp_bytes_histogram.sql | 43 ++++ sql/2023/performance/lcp_element_data.sql | 129 ++++++++++++ sql/2023/performance/lcp_format.sql | 42 ++++ sql/2023/performance/lcp_host.sql | 29 +++ sql/2023/performance/lcp_host_3p.sql | 31 +++ sql/2023/performance/lcp_initiator_type.sql | 43 ++++ sql/2023/performance/lcp_lazy.sql | 47 +++++ .../performance/lcp_lazy_technologies.sql | 75 +++++++ .../performance/lcp_preload_discoverable.sql | 28 +++ .../performance/lcp_resource_load_delay.sql | 53 +++++ sql/2023/performance/lcp_resource_type.sql | 31 +++ sql/2023/performance/lcp_responsive_data.sql | 59 ++++++ sql/2023/performance/lcp_wasted_bytes.sql | 63 ++++++ .../viewport_meta_zoom_disable.sql | 12 ++ sql/2023/performance/web_vitals_by_device.sql | 182 +++++++++++++++++ .../web_vitals_by_rank_and_device.sql | 190 ++++++++++++++++++ 25 files changed, 1311 insertions(+) create mode 100644 sql/2023/performance/bfcache_cachecontrol_nostore.sql create mode 100644 sql/2023/performance/bfcache_unload.sql create mode 100644 sql/2023/performance/cls_animations.sql create mode 100644 sql/2023/performance/cls_unsized_image_height.sql create mode 100644 sql/2023/performance/cls_unsized_images.sql create mode 100644 sql/2023/performance/inp_long_tasks.sql create mode 100644 sql/2023/performance/inp_tbt.sql create mode 100644 sql/2023/performance/js_bytes_rank.sql create mode 100644 sql/2023/performance/lcp_bytes_distribution.sql create mode 100644 sql/2023/performance/lcp_bytes_histogram.sql create mode 100644 sql/2023/performance/lcp_element_data.sql create mode 100644 sql/2023/performance/lcp_format.sql create mode 100644 sql/2023/performance/lcp_host.sql create mode 100644 sql/2023/performance/lcp_host_3p.sql create mode 100644 sql/2023/performance/lcp_initiator_type.sql create mode 100644 sql/2023/performance/lcp_lazy.sql create mode 100644 sql/2023/performance/lcp_lazy_technologies.sql create mode 100644 sql/2023/performance/lcp_preload_discoverable.sql create mode 100644 sql/2023/performance/lcp_resource_load_delay.sql create mode 100644 sql/2023/performance/lcp_resource_type.sql create mode 100644 sql/2023/performance/lcp_responsive_data.sql create mode 100644 sql/2023/performance/lcp_wasted_bytes.sql create mode 100644 sql/2023/performance/viewport_meta_zoom_disable.sql create mode 100644 sql/2023/performance/web_vitals_by_device.sql create mode 100644 sql/2023/performance/web_vitals_by_rank_and_device.sql 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 From 768a6ce34cd3cff6259bf31733ad6b24744dbeca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 May 2024 16:20:00 +0100 Subject: [PATCH 02/14] Bump puppeteer from 22.8.0 to 22.9.0 in /src (#3662) Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.8.0 to 22.9.0. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.8.0...puppeteer-v22.9.0) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/package-lock.json | 62 +++++++++++++++++++++---------------------- src/package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index ea6c300dc09..99ca6792fe8 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -15,7 +15,7 @@ "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", - "puppeteer": "22.8.0", + "puppeteer": "22.9.0", "rainbow-code": "2.1.7", "recursive-readdir": "2.2.3", "run-script-os": "1.1.6", @@ -214,9 +214,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz", - "integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==", + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "dev": true, "optional": true, "dependencies": { @@ -634,9 +634,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1273771", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1273771.tgz", - "integrity": "sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==", + "version": "0.0.1286932", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1286932.tgz", + "integrity": "sha512-wu58HMQll9voDjR4NlPyoDEw1syfzaBNHymMMZ/QOXiHRNluOnDgu9hp1yHOKYoMlxCh4lSSiugLITe6Fvu1eA==", "dev": true }, "node_modules/ejs": { @@ -1465,16 +1465,16 @@ } }, "node_modules/puppeteer": { - "version": "22.8.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.8.0.tgz", - "integrity": "sha512-Z616wyTr0d7KpxmfcBG22rAkzuo/xzHJ3ycpu4KiJ3dZNHn/C1CpqcCwPlpiIIsmPojTAfWjo6EMR7M+AaC0Ww==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.9.0.tgz", + "integrity": "sha512-yNux2cm6Sfik4lNLNjJ25Cdn9spJRbMXxl1YZtVZCEhEeej1sFlCvZ/Cr64LhgyJOuvz3iq2uk+RLFpQpGwrjw==", "dev": true, "hasInstallScript": true, "dependencies": { "@puppeteer/browsers": "2.2.3", "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1273771", - "puppeteer-core": "22.8.0" + "devtools-protocol": "0.0.1286932", + "puppeteer-core": "22.9.0" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -1484,15 +1484,15 @@ } }, "node_modules/puppeteer-core": { - "version": "22.8.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.8.0.tgz", - "integrity": "sha512-S5bWx3g/fNuyFxjZX9TkZMN07CEH47+9Zm6IiTl1QfqI9pnVaShbwrD9kRe5vmz/XPp/jLGhhxRUj1sY4wObnA==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.9.0.tgz", + "integrity": "sha512-Q2SYVZ1SIE7jCd/Pp+1/mNLFtdJfGvAF+CqOTDG8HcCNCiBvoXfopXfOfMHQ/FueXhGfJW/I6DartWv6QzpNGg==", "dev": true, "dependencies": { "@puppeteer/browsers": "2.2.3", "chromium-bidi": "0.5.19", "debug": "4.3.4", - "devtools-protocol": "0.0.1273771", + "devtools-protocol": "0.0.1286932", "ws": "8.17.0" }, "engines": { @@ -2239,9 +2239,9 @@ "dev": true }, "@types/node": { - "version": "20.12.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz", - "integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==", + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "dev": true, "optional": true, "requires": { @@ -2549,9 +2549,9 @@ "dev": true }, "devtools-protocol": { - "version": "0.0.1273771", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1273771.tgz", - "integrity": "sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==", + "version": "0.0.1286932", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1286932.tgz", + "integrity": "sha512-wu58HMQll9voDjR4NlPyoDEw1syfzaBNHymMMZ/QOXiHRNluOnDgu9hp1yHOKYoMlxCh4lSSiugLITe6Fvu1eA==", "dev": true }, "ejs": { @@ -3156,27 +3156,27 @@ "dev": true }, "puppeteer": { - "version": "22.8.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.8.0.tgz", - "integrity": "sha512-Z616wyTr0d7KpxmfcBG22rAkzuo/xzHJ3ycpu4KiJ3dZNHn/C1CpqcCwPlpiIIsmPojTAfWjo6EMR7M+AaC0Ww==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.9.0.tgz", + "integrity": "sha512-yNux2cm6Sfik4lNLNjJ25Cdn9spJRbMXxl1YZtVZCEhEeej1sFlCvZ/Cr64LhgyJOuvz3iq2uk+RLFpQpGwrjw==", "dev": true, "requires": { "@puppeteer/browsers": "2.2.3", "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1273771", - "puppeteer-core": "22.8.0" + "devtools-protocol": "0.0.1286932", + "puppeteer-core": "22.9.0" } }, "puppeteer-core": { - "version": "22.8.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.8.0.tgz", - "integrity": "sha512-S5bWx3g/fNuyFxjZX9TkZMN07CEH47+9Zm6IiTl1QfqI9pnVaShbwrD9kRe5vmz/XPp/jLGhhxRUj1sY4wObnA==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.9.0.tgz", + "integrity": "sha512-Q2SYVZ1SIE7jCd/Pp+1/mNLFtdJfGvAF+CqOTDG8HcCNCiBvoXfopXfOfMHQ/FueXhGfJW/I6DartWv6QzpNGg==", "dev": true, "requires": { "@puppeteer/browsers": "2.2.3", "chromium-bidi": "0.5.19", "debug": "4.3.4", - "devtools-protocol": "0.0.1273771", + "devtools-protocol": "0.0.1286932", "ws": "8.17.0" } }, diff --git a/src/package.json b/src/package.json index fb69424b127..dbaef5e92fa 100644 --- a/src/package.json +++ b/src/package.json @@ -41,7 +41,7 @@ "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", - "puppeteer": "22.8.0", + "puppeteer": "22.9.0", "rainbow-code": "2.1.7", "recursive-readdir": "2.2.3", "run-script-os": "1.1.6", From 1e7f55d7031339b907c760ff348269225d0a21c8 Mon Sep 17 00:00:00 2001 From: Rick Viscomi Date: Mon, 20 May 2024 15:22:56 -0400 Subject: [PATCH 03/14] Upgrade to web-vitals v4 (#3661) * Upgrade to web-vitals v4 * Update src/static/js/send-web-vitals.js Co-authored-by: Barry Pollard --------- Co-authored-by: Barry Pollard --- src/package-lock.json | 14 ++--- src/package.json | 2 +- src/static/js/send-web-vitals.js | 95 +++++++++++++------------------- src/templates/base.html | 1 - 4 files changed, 47 insertions(+), 65 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 99ca6792fe8..e7d6501da33 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -21,7 +21,7 @@ "run-script-os": "1.1.6", "showdown": "2.1.0", "smartypants": "0.2.2", - "web-vitals": "3.5.2", + "web-vitals": "4.0.0", "xml-js": "1.6.11" } }, @@ -1897,9 +1897,9 @@ } }, "node_modules/web-vitals": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.2.tgz", - "integrity": "sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.0.tgz", + "integrity": "sha512-8wQd4jkwFRwY5q3yAmHZAJ5MjnKR1vRACK+g2OEC8nUqi0WOxBrXfOxGNlJ+QtxzzSn/TkQO58wkW0coE68n0Q==", "dev": true }, "node_modules/web-worker": { @@ -3501,9 +3501,9 @@ "dev": true }, "web-vitals": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.2.tgz", - "integrity": "sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.0.tgz", + "integrity": "sha512-8wQd4jkwFRwY5q3yAmHZAJ5MjnKR1vRACK+g2OEC8nUqi0WOxBrXfOxGNlJ+QtxzzSn/TkQO58wkW0coE68n0Q==", "dev": true }, "web-worker": { diff --git a/src/package.json b/src/package.json index dbaef5e92fa..4401e33cb30 100644 --- a/src/package.json +++ b/src/package.json @@ -47,7 +47,7 @@ "run-script-os": "1.1.6", "showdown": "2.1.0", "smartypants": "0.2.2", - "web-vitals": "3.5.2", + "web-vitals": "4.0.0", "xml-js": "1.6.11" } } diff --git a/src/static/js/send-web-vitals.js b/src/static/js/send-web-vitals.js index 0e36f0152aa..a2b1795a24e 100644 --- a/src/static/js/send-web-vitals.js +++ b/src/static/js/send-web-vitals.js @@ -1,16 +1,7 @@ function sendWebVitals() { - function getLoafAttribution(attribution) { - if (!attribution) { - return {}; - } - - const entry = attribution.eventEntry; - if (!entry) { - return {}; - } - - if (!PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')) { + function getLoafAttribution(attribution) { + if (!attribution?.longAnimationFrameEntries) { return {}; } @@ -18,42 +9,37 @@ function sendWebVitals() { debug_loaf_script_total_duration: 0 }; - const longAnimationFrames = performance.getEntriesByType('long-animation-frame'); - longAnimationFrames.filter(loaf => { - // LoAFs that intersect with the event. - return entry.startTime < (loaf.startTime + loaf.duration) && loaf.startTime < (entry.startTime + entry.duration); - }).forEach(loaf => { - const loafEndTime = loaf.startTime + loaf.duration; - loaf.scripts.forEach(script => { - if (script.duration <= loafAttribution.debug_loaf_script_total_duration) { - return; - } - loafAttribution = { - // Stats for the LoAF entry itself. - debug_loaf_entry_start_time: loaf.startTime, - debug_loaf_entry_end_time: loafEndTime, - debug_loaf_entry_work_duration: loaf.renderStart ? loaf.renderStart - loaf.startTime : loaf.duration, - debug_loaf_entry_render_duration: loaf.renderStart ? loafEndTime - loaf.renderStart : 0, - debug_loaf_entry_total_forced_style_and_layout_duration: loaf.scripts.reduce((sum, script) => sum + script.forcedStyleAndLayoutDuration, 0), - debug_loaf_entry_pre_layout_duration: loaf.styleAndLayoutStart ? loaf.styleAndLayoutStart - loaf.renderStart : 0, - debug_loaf_entry_style_and_layout_duration: loaf.styleAndLayoutStart ? loafEndTime - loaf.styleAndLayoutStart : 0, - - // Stats for the longest script in the LoAF entry. - debug_loaf_script_total_duration: script.duration, - debug_loaf_script_compile_duration: script.executionStart - script.startTime, - debug_loaf_script_exec_duration: script.startTime + script.duration - script.executionStart, - debug_loaf_script_source: script.sourceLocation || script.invoker || script.name, // TODO: remove after Chrome 123 - debug_loaf_script_type: script.invokerType || script.type, // TODO: remove `|| script.type` after Chrome 123 - // New in Chrome 122/123 (will be null until then) - debug_loaf_script_invoker: script.invoker, - debug_loaf_script_source_url: script.sourceURL, - debug_loaf_script_source_function_name: script.sourceFunctionName, - debug_loaf_script_source_char_position: script.sourceCharPosition, - - // LoAF metadata. - debug_loaf_meta_length: longAnimationFrames.length, - } - }); + // The last LoAF entry is usually the most relevant. + const loaf = attribution.longAnimationFrameEntries.at(-1) + const loafEndTime = loaf.startTime + loaf.duration; + loaf.scripts.forEach(script => { + if (script.duration <= loafAttribution.debug_loaf_script_total_duration) { + return; + } + loafAttribution = { + // Stats for the LoAF entry itself. + debug_loaf_entry_start_time: loaf.startTime, + debug_loaf_entry_end_time: loafEndTime, + debug_loaf_entry_work_duration: loaf.renderStart ? loaf.renderStart - loaf.startTime : loaf.duration, + debug_loaf_entry_render_duration: loaf.renderStart ? loafEndTime - loaf.renderStart : 0, + debug_loaf_entry_total_forced_style_and_layout_duration: loaf.scripts.reduce((sum, script) => sum + script.forcedStyleAndLayoutDuration, 0), + debug_loaf_entry_pre_layout_duration: loaf.styleAndLayoutStart ? loaf.styleAndLayoutStart - loaf.renderStart : 0, + debug_loaf_entry_style_and_layout_duration: loaf.styleAndLayoutStart ? loafEndTime - loaf.styleAndLayoutStart : 0, + + // Stats for the longest script in the LoAF entry. + debug_loaf_script_total_duration: script.duration, + debug_loaf_script_compile_duration: script.executionStart - script.startTime, + debug_loaf_script_exec_duration: script.startTime + script.duration - script.executionStart, + debug_loaf_script_forced_style_and_layout_duration: script.forcedStyleAndLayoutDuration, + debug_loaf_script_type: script.invokerType, + debug_loaf_script_invoker: script.invoker, + debug_loaf_script_source_url: script.sourceURL, + debug_loaf_script_source_function_name: script.sourceFunctionName, + debug_loaf_script_source_char_position: script.sourceCharPosition, + + // LoAF metadata. + debug_loaf_meta_length: attribution.longAnimationFrameEntries.length, + } }); if (!loafAttribution.debug_loaf_script_total_duration) { @@ -91,18 +77,15 @@ function sendWebVitals() { case 'INP': const loafAttribution = getLoafAttribution(attribution); overrides = { - debug_event: attribution.eventType, - debug_time: Math.round(attribution.eventTime), + debug_event: attribution.interactionType, + debug_time: Math.round(attribution.interactionTime), debug_load_state: attribution.loadState, - debug_target: attribution.eventTarget || '(not set)', + debug_target: attribution.interactionTarget || '(not set)', + debug_interaction_delay: Math.round(attribution.inputDelay), + debug_processing_duration: Math.round(attribution.processingDuration), + debug_presentation_delay: Math.round(attribution.presentationDelay), ...loafAttribution }; - if (!attribution.eventEntry) { - break; - } - overrides.debug_interaction_delay = Math.round(attribution.eventEntry.processingStart - attribution.eventEntry.startTime); - overrides.debug_processing_time = Math.round(attribution.eventEntry.processingEnd - attribution.eventEntry.processingStart); - overrides.debug_presentation_delay = Math.round(attribution.eventEntry.duration + attribution.eventEntry.startTime - attribution.eventEntry.processingEnd); break; case 'LCP': overrides = { diff --git a/src/templates/base.html b/src/templates/base.html index 35e064e56e3..351dfca4960 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -4,7 +4,6 @@ - {% block head %} {% block title %}The Web Almanac{% endblock %} From 49f6ad10405c78cabf24f07f15dbe4d1d6d0bf49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 15:40:34 +0100 Subject: [PATCH 04/14] Bump pytest from 8.2.0 to 8.2.1 in /src (#3664) Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.0...8.2.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requirements.txt b/src/requirements.txt index 0a7b91db2df..060ab97d2c7 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,7 +1,7 @@ flask==3.0.3 flask-talisman==1.1.0 gunicorn==22.0.0 -pytest==8.2.0 +pytest==8.2.1 pytest-watch==4.2.0 pytest-cov==5.0.0 sqlfluff==1.4.5 From 9c6474528bd92d8f6b7b3de5e135526f74176269 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 13:26:38 +0100 Subject: [PATCH 05/14] --- (#3665) updated-dependencies: - dependency-name: web-vitals dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/package-lock.json | 14 +++++++------- src/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index e7d6501da33..72519a17d87 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -21,7 +21,7 @@ "run-script-os": "1.1.6", "showdown": "2.1.0", "smartypants": "0.2.2", - "web-vitals": "4.0.0", + "web-vitals": "4.0.1", "xml-js": "1.6.11" } }, @@ -1897,9 +1897,9 @@ } }, "node_modules/web-vitals": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.0.tgz", - "integrity": "sha512-8wQd4jkwFRwY5q3yAmHZAJ5MjnKR1vRACK+g2OEC8nUqi0WOxBrXfOxGNlJ+QtxzzSn/TkQO58wkW0coE68n0Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.1.tgz", + "integrity": "sha512-AW6qT/vXK3pbf+WgVcEBXY//AWCpXjVKgdb6rt0cARSUdtT+NUtZCOeo+CSLUX7PjSQ275DmxfkAs7QlPbtR6w==", "dev": true }, "node_modules/web-worker": { @@ -3501,9 +3501,9 @@ "dev": true }, "web-vitals": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.0.tgz", - "integrity": "sha512-8wQd4jkwFRwY5q3yAmHZAJ5MjnKR1vRACK+g2OEC8nUqi0WOxBrXfOxGNlJ+QtxzzSn/TkQO58wkW0coE68n0Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.1.tgz", + "integrity": "sha512-AW6qT/vXK3pbf+WgVcEBXY//AWCpXjVKgdb6rt0cARSUdtT+NUtZCOeo+CSLUX7PjSQ275DmxfkAs7QlPbtR6w==", "dev": true }, "web-worker": { diff --git a/src/package.json b/src/package.json index 4401e33cb30..b4007e133de 100644 --- a/src/package.json +++ b/src/package.json @@ -47,7 +47,7 @@ "run-script-os": "1.1.6", "showdown": "2.1.0", "smartypants": "0.2.2", - "web-vitals": "4.0.0", + "web-vitals": "4.0.1", "xml-js": "1.6.11" } } From e7566beb8ac64f332ebcc30604b5fff26e6ebcc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 13:25:55 +0100 Subject: [PATCH 06/14] Bump puppeteer from 22.9.0 to 22.10.0 in /src (#3668) Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.9.0 to 22.10.0. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.9.0...puppeteer-v22.10.0) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/package-lock.json | 42 +++++++++++++++++++++--------------------- src/package.json | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 72519a17d87..038df09f9b8 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -15,7 +15,7 @@ "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", - "puppeteer": "22.9.0", + "puppeteer": "22.10.0", "rainbow-code": "2.1.7", "recursive-readdir": "2.2.3", "run-script-os": "1.1.6", @@ -338,9 +338,9 @@ "optional": true }, "node_modules/bare-path": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz", - "integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", "dev": true, "optional": true, "dependencies": { @@ -1465,16 +1465,16 @@ } }, "node_modules/puppeteer": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.9.0.tgz", - "integrity": "sha512-yNux2cm6Sfik4lNLNjJ25Cdn9spJRbMXxl1YZtVZCEhEeej1sFlCvZ/Cr64LhgyJOuvz3iq2uk+RLFpQpGwrjw==", + "version": "22.10.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.10.0.tgz", + "integrity": "sha512-ZOkZd6a6t0BdKcWb0wAYHWQqCfdlN1PPnXOmg/XNrbo6gJhYWFX4qCNb6ahSn8TpAqBqLCoD4Q010F7GwOM7mA==", "dev": true, "hasInstallScript": true, "dependencies": { "@puppeteer/browsers": "2.2.3", "cosmiconfig": "9.0.0", "devtools-protocol": "0.0.1286932", - "puppeteer-core": "22.9.0" + "puppeteer-core": "22.10.0" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -1484,9 +1484,9 @@ } }, "node_modules/puppeteer-core": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.9.0.tgz", - "integrity": "sha512-Q2SYVZ1SIE7jCd/Pp+1/mNLFtdJfGvAF+CqOTDG8HcCNCiBvoXfopXfOfMHQ/FueXhGfJW/I6DartWv6QzpNGg==", + "version": "22.10.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.10.0.tgz", + "integrity": "sha512-I54J4Vy4I07UHsgB1QSmuFoF7KNQjJWcvFBPhtY+ezMdBfwgGDr8dzYrJa11aPgP9kxIUHjhktcMmmfJkOAtTw==", "dev": true, "dependencies": { "@puppeteer/browsers": "2.2.3", @@ -2348,9 +2348,9 @@ "optional": true }, "bare-path": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz", - "integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", "dev": true, "optional": true, "requires": { @@ -3156,21 +3156,21 @@ "dev": true }, "puppeteer": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.9.0.tgz", - "integrity": "sha512-yNux2cm6Sfik4lNLNjJ25Cdn9spJRbMXxl1YZtVZCEhEeej1sFlCvZ/Cr64LhgyJOuvz3iq2uk+RLFpQpGwrjw==", + "version": "22.10.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.10.0.tgz", + "integrity": "sha512-ZOkZd6a6t0BdKcWb0wAYHWQqCfdlN1PPnXOmg/XNrbo6gJhYWFX4qCNb6ahSn8TpAqBqLCoD4Q010F7GwOM7mA==", "dev": true, "requires": { "@puppeteer/browsers": "2.2.3", "cosmiconfig": "9.0.0", "devtools-protocol": "0.0.1286932", - "puppeteer-core": "22.9.0" + "puppeteer-core": "22.10.0" } }, "puppeteer-core": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.9.0.tgz", - "integrity": "sha512-Q2SYVZ1SIE7jCd/Pp+1/mNLFtdJfGvAF+CqOTDG8HcCNCiBvoXfopXfOfMHQ/FueXhGfJW/I6DartWv6QzpNGg==", + "version": "22.10.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.10.0.tgz", + "integrity": "sha512-I54J4Vy4I07UHsgB1QSmuFoF7KNQjJWcvFBPhtY+ezMdBfwgGDr8dzYrJa11aPgP9kxIUHjhktcMmmfJkOAtTw==", "dev": true, "requires": { "@puppeteer/browsers": "2.2.3", diff --git a/src/package.json b/src/package.json index b4007e133de..eed6176d222 100644 --- a/src/package.json +++ b/src/package.json @@ -41,7 +41,7 @@ "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", - "puppeteer": "22.9.0", + "puppeteer": "22.10.0", "rainbow-code": "2.1.7", "recursive-readdir": "2.2.3", "run-script-os": "1.1.6", From a0be1dd5575d2430115a79652aac71748d4e23f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 15:25:01 +0100 Subject: [PATCH 07/14] Bump jsdom from 24.0.0 to 24.1.0 in /src (#3669) Bumps [jsdom](https://github.com/jsdom/jsdom) from 24.0.0 to 24.1.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/24.0.0...24.1.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/package-lock.json | 76 +++++++++++++++++++++++++------------------ src/package.json | 2 +- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 038df09f9b8..766f90f8f67 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "ejs": "3.1.10", "fs-extra": "11.2.0", - "jsdom": "24.0.0", + "jsdom": "24.1.0", "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", @@ -1123,9 +1123,9 @@ "dev": true }, "node_modules/jsdom": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", - "integrity": "sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", + "integrity": "sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==", "dev": true, "dependencies": { "cssstyle": "^4.0.1", @@ -1133,21 +1133,21 @@ "decimal.js": "^10.4.3", "form-data": "^4.0.0", "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.4", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", + "nwsapi": "^2.2.10", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.3", + "tough-cookie": "^4.1.4", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.16.0", + "ws": "^8.17.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -1162,6 +1162,12 @@ } } }, + "node_modules/jsdom/node_modules/rrweb-cssom": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", + "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -1296,9 +1302,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.10", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", + "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==", "dev": true }, "node_modules/once": { @@ -1792,9 +1798,9 @@ "dev": true }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "dependencies": { "psl": "^1.1.33", @@ -2901,9 +2907,9 @@ "dev": true }, "jsdom": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", - "integrity": "sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", + "integrity": "sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==", "dev": true, "requires": { "cssstyle": "^4.0.1", @@ -2911,22 +2917,30 @@ "decimal.js": "^10.4.3", "form-data": "^4.0.0", "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.4", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", + "nwsapi": "^2.2.10", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.3", + "tough-cookie": "^4.1.4", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.16.0", + "ws": "^8.17.0", "xml-name-validator": "^5.0.0" + }, + "dependencies": { + "rrweb-cssom": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", + "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==", + "dev": true + } } }, "json-parse-even-better-errors": { @@ -3023,9 +3037,9 @@ "dev": true }, "nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.10", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", + "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==", "dev": true }, "once": { @@ -3412,9 +3426,9 @@ "dev": true }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", diff --git a/src/package.json b/src/package.json index eed6176d222..47aee366f05 100644 --- a/src/package.json +++ b/src/package.json @@ -37,7 +37,7 @@ "devDependencies": { "ejs": "3.1.10", "fs-extra": "11.2.0", - "jsdom": "24.0.0", + "jsdom": "24.1.0", "node-fetch": "3.3.2", "node-watch": "0.7.4", "prettier": "3.2.5", From ddcef7d7aa4f6b41c2a55695af58a3b750690c0e Mon Sep 17 00:00:00 2001 From: Boris Schapira Date: Tue, 28 May 2024 21:51:41 +0200 Subject: [PATCH 08/14] Typofix (#3670) Seems like "desktop" is mentioned twice and according to the data, the second mention is related to mobile https://docs.google.com/spreadsheets/d/1JvJMiRsL6T9m_NEBHFh-rrQmU5a-ufdOKriSJbrEN8M/edit#gid=1472139207 --- src/content/en/2022/page-weight.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/en/2022/page-weight.md b/src/content/en/2022/page-weight.md index 110d213f85a..db6709c860c 100644 --- a/src/content/en/2022/page-weight.md +++ b/src/content/en/2022/page-weight.md @@ -233,7 +233,7 @@ Looking at the median page weight over time, it remains clear that the trend rem In the 10-year period between June 2012 to June 2022, the median page weight increased by 221%, or 1.6 MB, for desktop page loads, 594%, or 1.7 MB for mobile page loads -Year on year, (June 2022 versus June 2021) desktop increased from 2,121 KB to 2,315 KB on desktop, 1,912 KB to 2,020 KB on desktop. +Year on year, (June 2022 versus June 2021) desktop increased from 2,121 KB to 2,315 KB on desktop, 1,912 KB to 2,020 KB on mobile. #### Content type and file formats From b4a0839ffa74dd9b47072439d5d434e1001807ca Mon Sep 17 00:00:00 2001 From: ChrisBeeti <32492572+ChrisBeeti@users.noreply.github.com> Date: Wed, 29 May 2024 15:17:57 +0200 Subject: [PATCH 09/14] SQL and MD folders the 2024 Web Almanac (#3666) * upload 2024 * change mds * Test update * Revert test update * Fix line endings --------- Co-authored-by: Barry Pollard --- sql/2024/accessibility/README.md | 20 +++++++++ sql/2024/caching/README.md | 20 +++++++++ sql/2024/capabilities/README.md | 20 +++++++++ sql/2024/cdn/README.md | 26 ++++++++++++ sql/2024/cms/README.md | 20 +++++++++ sql/2024/compression/README.md | 29 +++++++++++++ sql/2024/cookies/README.md | 20 +++++++++ sql/2024/css/README.md | 20 +++++++++ sql/2024/ecommerce/README.md | 22 ++++++++++ sql/2024/fonts/README.md | 20 +++++++++ sql/2024/http/README.md | 20 +++++++++ sql/2024/interoperability/README.md | 20 +++++++++ sql/2024/jamstack/README.md | 20 +++++++++ sql/2024/javascript/README.md | 20 +++++++++ sql/2024/markup/README.md | 20 +++++++++ sql/2024/media/README.md | 54 +++++++++++++++++++++++++ sql/2024/mobile-web/README.md | 22 ++++++++++ sql/2024/page-weight/README.md | 19 +++++++++ sql/2024/performance/README.md | 21 ++++++++++ sql/2024/privacy/README.md | 20 +++++++++ sql/2024/pwa/README.md | 20 +++++++++ sql/2024/security/README.md | 22 ++++++++++ sql/2024/seo/README.md | 20 +++++++++ sql/2024/structured-data/README.md | 20 +++++++++ sql/2024/sustainability/README.md | 20 +++++++++ sql/2024/third-parties/README.md | 20 +++++++++ sql/2024/trends/README.md | 20 +++++++++ sql/2024/webassembly/README.md | 20 +++++++++ src/content/en/2024/accessibility.md | 18 +++++++++ src/content/en/2024/capabilities.md | 18 +++++++++ src/content/en/2024/cdn.md | 18 +++++++++ src/content/en/2024/cms.md | 18 +++++++++ src/content/en/2024/cookies.md | 16 ++++++++ src/content/en/2024/css.md | 18 +++++++++ src/content/en/2024/fonts.md | 18 +++++++++ src/content/en/2024/http.md | 18 +++++++++ src/content/en/2024/interoperability.md | 18 +++++++++ src/content/en/2024/jamstack.md | 18 +++++++++ src/content/en/2024/javascript.md | 18 +++++++++ src/content/en/2024/markup.md | 18 +++++++++ src/content/en/2024/media.md | 18 +++++++++ src/content/en/2024/mobile-web.md | 18 +++++++++ src/content/en/2024/page-weight.md | 18 +++++++++ src/content/en/2024/performance.md | 18 +++++++++ src/content/en/2024/privacy.md | 18 +++++++++ src/content/en/2024/pwa.md | 18 +++++++++ src/content/en/2024/security.md | 18 +++++++++ src/content/en/2024/seo.md | 18 +++++++++ src/content/en/2024/structured-data.md | 18 +++++++++ src/content/en/2024/sustainability.md | 18 +++++++++ src/content/en/2024/third-parties.md | 18 +++++++++ src/content/en/2024/trends.md | 16 ++++++++ src/content/en/2024/webassembly.md | 18 +++++++++ 53 files changed, 1061 insertions(+) create mode 100644 sql/2024/accessibility/README.md create mode 100644 sql/2024/caching/README.md create mode 100644 sql/2024/capabilities/README.md create mode 100644 sql/2024/cdn/README.md create mode 100644 sql/2024/cms/README.md create mode 100644 sql/2024/compression/README.md create mode 100644 sql/2024/cookies/README.md create mode 100644 sql/2024/css/README.md create mode 100644 sql/2024/ecommerce/README.md create mode 100644 sql/2024/fonts/README.md create mode 100644 sql/2024/http/README.md create mode 100644 sql/2024/interoperability/README.md create mode 100644 sql/2024/jamstack/README.md create mode 100644 sql/2024/javascript/README.md create mode 100644 sql/2024/markup/README.md create mode 100644 sql/2024/media/README.md create mode 100644 sql/2024/mobile-web/README.md create mode 100644 sql/2024/page-weight/README.md create mode 100644 sql/2024/performance/README.md create mode 100644 sql/2024/privacy/README.md create mode 100644 sql/2024/pwa/README.md create mode 100644 sql/2024/security/README.md create mode 100644 sql/2024/seo/README.md create mode 100644 sql/2024/structured-data/README.md create mode 100644 sql/2024/sustainability/README.md create mode 100644 sql/2024/third-parties/README.md create mode 100644 sql/2024/trends/README.md create mode 100644 sql/2024/webassembly/README.md create mode 100644 src/content/en/2024/accessibility.md create mode 100644 src/content/en/2024/capabilities.md create mode 100644 src/content/en/2024/cdn.md create mode 100644 src/content/en/2024/cms.md create mode 100644 src/content/en/2024/cookies.md create mode 100644 src/content/en/2024/css.md create mode 100644 src/content/en/2024/fonts.md create mode 100644 src/content/en/2024/http.md create mode 100644 src/content/en/2024/interoperability.md create mode 100644 src/content/en/2024/jamstack.md create mode 100644 src/content/en/2024/javascript.md create mode 100644 src/content/en/2024/markup.md create mode 100644 src/content/en/2024/media.md create mode 100644 src/content/en/2024/mobile-web.md create mode 100644 src/content/en/2024/page-weight.md create mode 100644 src/content/en/2024/performance.md create mode 100644 src/content/en/2024/privacy.md create mode 100644 src/content/en/2024/pwa.md create mode 100644 src/content/en/2024/security.md create mode 100644 src/content/en/2024/seo.md create mode 100644 src/content/en/2024/structured-data.md create mode 100644 src/content/en/2024/sustainability.md create mode 100644 src/content/en/2024/third-parties.md create mode 100644 src/content/en/2024/trends.md create mode 100644 src/content/en/2024/webassembly.md 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 `