Skip to content

Commit 4647957

Browse files
WebAssembly 2025 chapter (#4356)
* WebAssembly 2025 chapter * Linting * more edits * Add images * Optimised images with calibre/image-actions * More edits * Change contribitors * Update src/content/en/2025/webassembly.md * Final edits * Fix link --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8e1daed commit 4647957

15 files changed

Lines changed: 359 additions & 53 deletions

sql/2025/webassembly/counts.sql

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,60 @@
1-
# Query for wasm requests' count with distinct wasm origin name
1+
# Query for wasm requests and sites counts
22

33
WITH wasmRequests AS (
44
SELECT
5+
date,
56
client,
67
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
8+
root_page,
9+
url,
10+
REGEXP_EXTRACT(url, r'([^/]+)$') AS filename -- lowercase & extract filename between last `/` and `.` or `?`
1911
FROM
2012
`httparchive.crawl.requests`
2113
WHERE
22-
date = '2025-07-01' AND
23-
type = 'wasm'
14+
date IN ('2021-07-01', '2022-06-01', '2024-06-01', '2025-07-01') AND
15+
(
16+
(date IN ('2024-06-01', '2025-07-01') AND type = 'wasm') -- wasm type was added in Jan 2024
17+
OR
18+
(date IN ('2021-07-01', '2022-06-01') AND (JSON_VALUE(summary.mimeType) = 'application/wasm' OR JSON_VALUE(summary.ext) = 'wasm'))
19+
)
20+
),
21+
22+
totals AS (
23+
SELECT
24+
date,
25+
client,
26+
COUNT(DISTINCT root_page) AS total_sites,
27+
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS total_reg_domains
28+
FROM
29+
`httparchive.crawl.requests`
30+
WHERE
31+
date IN ('2021-07-01', '2022-06-01', '2024-06-01', '2025-07-01')
32+
GROUP BY
33+
date,
34+
client
2435
)
2536

2637
SELECT
38+
date,
2739
client,
2840
COUNT(0) AS total_wasm,
29-
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS distinct_origin
41+
COUNT(DISTINCT filename) AS unique_wasm,
42+
COUNT(DISTINCT root_page) AS sites,
43+
total_sites,
44+
COUNT(DISTINCT root_page) / total_sites AS pct_sites,
45+
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS reg_domains,
46+
total_reg_domains,
47+
COUNT(DISTINCT NET.REG_DOMAIN(page)) / total_reg_domains AS pct_reg_domains
3048
FROM
3149
wasmRequests
50+
INNER JOIN
51+
totals
52+
USING (date, client)
3253
GROUP BY
33-
client
54+
date,
55+
client,
56+
total_sites,
57+
total_reg_domains
3458
ORDER BY
59+
date DESC,
3560
client

sql/2025/webassembly/page_rankings.sql

Lines changed: 0 additions & 21 deletions
This file was deleted.

sql/2025/webassembly/ranking.sql

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# WASM usage by page ranking
2+
3+
WITH totals AS (
4+
SELECT
5+
client,
6+
rank_grouping,
7+
COUNT(DISTINCT root_page) AS total_sites
8+
FROM
9+
`httparchive.crawl.requests`,
10+
UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS rank_grouping
11+
WHERE
12+
date = '2025-07-01' AND
13+
rank <= rank_grouping
14+
GROUP BY
15+
client,
16+
rank_grouping
17+
ORDER BY
18+
client,
19+
rank_grouping
20+
)
21+
22+
SELECT
23+
client,
24+
rank_grouping,
25+
CASE
26+
WHEN rank_grouping = 100000000 THEN 'all'
27+
ELSE FORMAT("%'d", rank_grouping)
28+
END AS ranking,
29+
COUNT(DISTINCT root_page) AS sites,
30+
total_sites,
31+
COUNT(DISTINCT root_page) / total_sites AS pct_sites
32+
FROM
33+
`httparchive.crawl.requests`,
34+
UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS rank_grouping
35+
INNER JOIN
36+
totals
37+
USING (client, rank_grouping)
38+
WHERE
39+
date = '2025-07-01' AND
40+
type = 'wasm' AND
41+
rank <= rank_grouping
42+
GROUP BY
43+
client,
44+
rank_grouping,
45+
total_sites
46+
ORDER BY
47+
client,
48+
rank_grouping

src/config/2025.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"chapter_number": "2",
2323
"title": "WebAssembly",
2424
"slug": "webassembly",
25-
"hero_dir": "2021",
26-
"todo": true
25+
"hero_dir": "2021"
2726
},
2827
{
2928
"part": "I",

src/config/contributors.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3668,6 +3668,19 @@
36683668
]
36693669
}
36703670
},
3671+
"nimeshgit": {
3672+
"avatar_url": "38841604",
3673+
"github": "nimeshgit",
3674+
"linkedin": "ops-ml-architect",
3675+
"name": "Nimesh Vadgama - VN",
3676+
"teams": {
3677+
"2025": [
3678+
"analysts",
3679+
"authors"
3680+
]
3681+
},
3682+
"website": "https://ops-ml-architect.blogspot.com/"
3683+
},
36713684
"NishuGoel": {
36723685
"avatar_url": "26349046",
36733686
"github": "NishuGoel",
@@ -3757,8 +3770,9 @@
37573770
"reviewers"
37583771
],
37593772
"2025": [
3773+
"committee",
37603774
"leads",
3761-
"committee"
3775+
"reviewers"
37623776
]
37633777
},
37643778
"twitter": "nrllah",

0 commit comments

Comments
 (0)