Skip to content

Commit 066127b

Browse files
dwsmarttunetheweb
andauthored
Adds page weight use-efficient-cache-lifetimes.sql Query, plus typo fix for a file name (#4266)
* corrects filename for response_media_file_type_distribution.sql * adds use-efficient-cache-lifetimes.sql lighthouse metric query * group root and internal pages --------- Co-authored-by: Barry Pollard <[email protected]>
1 parent ce91d52 commit 066127b

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- looks at the distribution of wasted bytes from resources identified by the Lighthouse "Use Efficient Cache Lifetimes" audit
2+
-- https://developer.chrome.com/docs/performance/insights/cache
3+
SELECT
4+
percentile,
5+
client,
6+
is_root_page,
7+
--get the wasted bytes from resources that could be cached longer, in KB
8+
APPROX_QUANTILES((CAST(JSON_VALUE(lighthouse.audits['uses-long-cache-ttl'].numericValue) AS FLOAT64) / 1024), 1000)[OFFSET(percentile * 10)] AS wasted_kb
9+
FROM
10+
`httparchive.crawl.pages`,
11+
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile
12+
WHERE
13+
date = '2025-07-01'
14+
GROUP BY
15+
percentile,
16+
client,
17+
is_root_page
18+
ORDER BY
19+
client,
20+
is_root_page,
21+
percentile

0 commit comments

Comments
 (0)