Skip to content

Commit 122ec52

Browse files
committed
speculation_rules_rank.sql
1 parent 7764aad commit 122ec52

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SELECT
2+
IF(ranking < 100000000, CAST(ranking AS STRING), 'all') AS ranking,
3+
client,
4+
COUNTIF(
5+
custom_metrics.performance.speculation_rules IS NOT NULL AND (
6+
ARRAY_LENGTH(JSON_QUERY_ARRAY(custom_metrics.performance.speculation_rules.htmlRules)) > 0 OR
7+
ARRAY_LENGTH(JSON_QUERY_ARRAY(custom_metrics.performance.speculation_rules.httpHeaderRules)) > 0
8+
)
9+
) / COUNT(0) AS has_speculation_rules
10+
FROM
11+
`httparchive.crawl.pages`,
12+
UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS ranking
13+
WHERE
14+
date = '2025-07-01' AND
15+
is_root_page AND
16+
rank <= ranking
17+
GROUP BY
18+
ranking,
19+
client
20+
ORDER BY
21+
ranking,
22+
client

0 commit comments

Comments
 (0)