File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Query for wasm requests' count with distinct wasm name
1+ # Query for wasm requests' count with distinct wasm origin name
22
33WITH wasmRequests AS (
4- SELECT
5- client,
6- CASE
7- WHEN REGEXP_CONTAINS(url, r' /(hyphenopoly|patterns).*/[a-z-]{2,5}\. wasm' )
8- THEN ' (hyphenopoly dictionary)'
9- WHEN ENDS_WITH(url, ' .unityweb' )
10- THEN ' (unityweb app)'
11- ELSE
12- REGEXP_REPLACE(
13- REGEXP_EXTRACT(LOWER (url), r' .*/([^./?]*)' ), -- lowercase & extract filename between last `/` and `.` or `?`
14- r' -[0-9a-f]{20,32}$' , -- trim trailing hashes to transform `name-0abc43234[...]` to `name`
15- ' '
16- )
17- END AS name
18- FROM
19- ` httparchive.crawl.requests`
20- WHERE
21- date = ' 2025-07-01' AND
22- type = ' wasm'
4+ SELECT
5+ client,
6+ page,
7+ CASE
8+ WHEN REGEXP_CONTAINS(url, r' /(hyphenopoly|patterns).*/[a-z-]{2,5}\. wasm' )
9+ THEN ' (hyphenopoly dictionary)'
10+ WHEN ENDS_WITH(url, ' .unityweb' )
11+ THEN ' (unityweb app)'
12+ ELSE
13+ REGEXP_REPLACE(
14+ REGEXP_EXTRACT(LOWER (url), r' ./([^./?])' ), -- lowercase & extract filename between last `/` and `.` or `?`
15+ r' -[0-9a-f]{20,32}$' , -- trim trailing hashes to transform `name-0abc43234[...]` to `name`
16+ ' '
17+ )
18+ END AS name
19+ FROM
20+ ` httparchive.crawl.requests`
21+ WHERE
22+ date = ' 2025-07-01' AND
23+ type = ' wasm'
2324)
2425
2526SELECT
26- client,
27- COUNT (0 ) AS total_wasm,
28- COUNT (DISTINCT name) AS total_distinct_wasm
27+ client,
28+ COUNT (0 ) AS total_wasm,
29+ COUNT (DISTINCT NET . REG_DOMAIN (page)) AS distinct_origin
2930FROM
30- wasmRequests
31+ wasmRequests
3132GROUP BY
32- client
33+ client
3334ORDER BY
34- client
35+ client
You can’t perform that action at this time.
0 commit comments