Where runtime Helix minutes go, and why WebAssembly is a large share
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- csharp, github-actions, wasm
- 领域
- ci-cd, performance
调研方向
This issue is an informational analysis and does not propose a specific change. It references eng/pipelines/runtime.yml and evaluate-default-paths.yml, plus the Chrome and Wasmtime library-test templates; read those alongside the trigger observations in section B3. The issue offers several options for discussion, but does not identify an agreed action or a completion criterion.
由索引模型根据 Issue 内容生成。
描述
This issue summarizes where dotnet/runtime Helix time went over the last seven days. It explains why WebAssembly accounts for a large share and lists some options that may be worth a closer look. It is informational only and does not propose a specific change.
/cc @lewing @steveisok
Data and method
- Window: Nov 20, 21:47 UTC – Nov 27, 21:47 UTC (7 days).
- Source: Helix
WorkItemsjoined toJobsin theengsrvprod/engineeringdataKusto database. - Scope: Jobs whose source is
dotnet/runtime. This includes PRs, rolling CI, and other builds on every branch. - Measure: Total time that completed work items spent running, from start to finish. It does not measure VM uptime, CPU time, billing, queue wait, or Azure Pipelines build-agent time.
- Counting: Each attempt is counted once. Work that began before the window is counted only from the start of the window.
- WebAssembly: Any Helix job that ran in a
*-helix-webassembly*container, on either Linux or Windows hosts.
A. How dotnet/runtime Helix minutes are spent
| Category | Work items | Minutes | Share | PR minutes | CI minutes |
|---|---|---|---|---|---|
| Windows (not WebAssembly) | 1,332,965 | 2,111,664 | 36.8% | 1,163,795 | 738,527 |
| WebAssembly (browser + WASI) | 313,021 | 1,480,909 | 25.8% | 1,082,460 | 397,028 |
| Linux x64 and other | 852,801 | 758,870 | 13.2% | 351,863 | 219,980 |
| Linux arm64 | 712,804 | 685,811 | 11.9% | 328,158 | 211,027 |
| macOS | 536,577 | 563,575 | 9.8% | 229,210 | 333,189 |
| Android | 61,429 | 139,687 | 2.4% | 70,146 | 69,486 |
| Total | 5,740,516 | 3,225,632 |
WebAssembly is about a quarter of all runtime Helix minutes and about a third (33.6%) of PR minutes. Of the 388 runtime PRs that sent any work to Helix in this window, 358 (92%) ran WebAssembly jobs. Those PRs averaged about 22 WebAssembly Helix jobs each.
B. Why WebAssembly minutes are high
B1. Where the WebAssembly minutes go
| Workload | Minutes | Share of WebAssembly | PRs that ran it | PR minutes per PR | Average minutes per item |
|---|---|---|---|---|---|
| Wasm.Build.Tests (SDK app-build tests) | 602,823 | 40.7% | 93 | ~4,850 | 20.1 |
| Library tests in Chrome | 465,685 | 31.4% | 360 | ~760 | 5.9 |
| Library tests in Wasmtime (WASI) | 182,802 | 12.3% | 330 | ~530 | 1.8 |
CoreCLR runtime tests (src/tests) |
176,833 | 11.9% | 367 | ~370 | 2.3 |
| Library tests in Firefox, V8, and others | 52,766 | 3.6% | 359 | ~130 | — |
By host OS, minutes are split about evenly: ~755k on Windows-hosted containers and ~726k on Linux-hosted containers.
- Windows-hosted Wasm.Build.Tests account for about 488k minutes, the largest single bucket. They average about 30 minutes per work item, compared with about 8.4 minutes per item on Linux.
- Windows-hosted Chrome library tests account for about 205k minutes. They come from
release/10.0andrelease/11.0builds and from PRs. These are mostly Mono jobs (WasmTestOnChrome-ST-*andWasmTestOnChrome-MONO-ST-*).mainno longer has Windows Chrome library-test jobs.
B2. Tests take longer per run under WebAssembly
Median runtime in minutes for passing runs of the same test assembly. The native baseline combines several runtime configurations, so treat these ratios as rough.
| Test assembly | Native Linux x64 | Chrome | Firefox | V8 | Wasmtime |
|---|---|---|---|---|---|
| System.Text.Encodings.Web.Tests | 0.35 | 1.63 | 1.78 | 1.53 | 15.77 |
| System.Collections.Immutable.Tests | 1.05 | 3.54 | 3.75 | 2.15 | 13.75 |
| System.Globalization.Tests | 0.88 | 1.68 | 1.58 | 0.98 | 10.23 |
| System.Linq.Expressions.Tests | 0.48 | 1.67 | 1.57 | 1.90 | 8.36 |
| System.Runtime.Tests | 1.93 | 3.27 | 19.04 | 13.87 | 18.38 |
In browsers, the same tests usually take about 1.5–4× as long as native runs. In Wasmtime they often take 10–45× as long. These durations include host and browser startup and test setup, not just WebAssembly execution.
B3. Pipeline triggers
The following refers to eng/pipelines/runtime.yml and its templates at main commit 5b65c8d4.
-
The
librariespath filter matches almost any change. Inevaluate-default-paths.yml, thelibrariessubset has only an exclude list. It therefore matches most changes outsidesrc/coreclr,src/mono,src/tests, and the other excluded paths. This filter is one of the triggers for both of these jobs:- The CoreCLR Chrome library-test job (
wasm-coreclr-library-tests.yml,scenarios: WasmTestOnChrome). - The CoreCLR Wasmtime library-test job (
wasi-wasm-coreclr-library-tests.yml).
Both templates have a
shouldRunSmokeOnly: onLibrariesAndIllinkChangesmode. In that mode, a change that touches libraries or ILLink but nothing WebAssembly-specific runs only the smoke tests.runtime.ymldoes not use that mode for the main Chrome or Wasmtime jobs, so they run the full suites. Only the_SmokeFirefoxV8,_Smoke_R2R, and WASI_R2Rjobs are smoke-only. - The CoreCLR Chrome library-test job (
-
The
wasm_coreclr_runtimetestsfilter includes all ofsrc/coreclr/*andsrc/tests/*. Any CoreCLR or test change therefore triggers:- The browser and WASI CoreCLR builds.
- The WASI CoreCLR runtime tests, both interpreter and ReadyToRun.
- The browser CoreCLR runtime tests. These also run on any change that matches the
coreclrfilter.
-
Wasm.Build.Tests are triggered rarely but cost a lot per run. The
wasmbuildtestsfilter is narrow, along with the ILLink and dependency-flow triggers. Even so, each run sends about 10 Helix jobs that total about 2,300 minutes, mainly on Windows. Active WebAssembly PRs push many times. For example, #138027 used about 28k Wasm.Build.Tests minutes in this window.- Of the 93 PRs,
dotnet-maestrodependency and code-flow PRs accounted for about 66k of the 451k PR minutes. - A few PRs whose titles don't suggest WebAssembly changes also triggered Wasm.Build.Tests, such as #137944 (PAL cleanup) and #137670 (EventPipe file permissions). It may be worth checking which filter they matched.
- Of the 93 PRs,
-
Rolling builds run every WebAssembly job (
alwaysRun: isRollingBuild). They are already batched and scheduled twice a day. Rolling CI used about 397k WebAssembly minutes in this window.
C. Options that may be worth a closer look
These are listed only for discussion. Each one trades some coverage for fewer minutes, and the WebAssembly owners are best placed to judge whether that trade is acceptable.
- Use smoke-only mode for library-only changes. Pass
shouldRunSmokeOnly: onLibrariesAndIllinkChangesto the main CoreCLR Chrome and Wasmtime library-test jobs. Full runs would still happen on rolling builds, outer loop, and changes that match a WebAssembly-specific filter. On Linux, these two jobs used about 360k PR minutes in this window. - Narrow
wasm_coreclr_runtimetests. Instead of all ofsrc/coreclr/*andsrc/tests/*, it could cover only the WebAssembly-relevant areas, such assrc/coreclr/vm/wasm, the interpreter, the JIT, crossgen2/ReadyToRun, and WebAssembly test infrastructure. This would reduce how often the browser and WASI builds and runtime tests run. - Look at the Windows-hosted Wasm.Build.Tests jobs. Each work item takes about 3.5× as long as on Linux, and these jobs account for about a third of all WebAssembly minutes. Options include running a subset on PRs and the full matrix on rolling builds. Another is reducing the per-run fan-out (the Workloads, Webcil, Fingerprinting, and Bundler combinations).
- Review the slowest Wasmtime suites. Some assemblies run 10–45× slower than native. Splitting, trimming, or moving the heaviest ones to outer loop could help without removing WASI coverage.
- Check why some PRs triggered Wasm.Build.Tests. Some PRs that seem unrelated to WebAssembly did, as noted in B3.3.
- Review release-branch Windows Chrome (Mono) jobs. They used about 205k minutes this week in
release/10.0andrelease/11.0, through rolling builds and PRs.
Queries are available on request.
- 主要语言
- C#
- 星标
- 18.5k
- 派生
- 5.8k
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 597
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/runtime 的其他 Issue
-
area-VM-meta-mono untriaged
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area-Debugger-mono untriaged
难度 2/5 1-3 小时 新手友好度 75/100
dotnet/runtime#138494 · 1 条评论 ·
维护者通常 1 天内回复
-
area-AssemblyLoader-mono untriaged
难度 2/5 1-3 小时 新手友好度 78/100
dotnet/runtime#138493 · 1 条评论 ·
维护者通常 1 天内回复
-
JsonConsoleFormatter throws on NaN and infinite double and float values, failing the log call可能已有人在做 @Mohamedadel-prog 于 2 天前认领。 未关闭area-Extensions-Logging untriaged
难度 2/5 1-3 小时 新手友好度 82/100
dotnet/runtime#138418 · 2 条评论 ·
维护者通常 1 天内回复
-
area-System.IO untriaged
难度 2/5 1-3 小时 新手友好度 78/100
dotnet/runtime#138417 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
juandresrodca/AdminForge#69 ·
维护者通常 1 天内回复
-
chore small tooling
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
BattletechModders/ModTek#256 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
Facepunch/sbox-public#12484 ·
维护者通常 2 天内回复