Tests are not truly parallelized when run with Traversal project
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- csharp
- 领域
- build-system
调研方向
从链接的 dotCoverParallelizationIssue 复现开始,比较 dotnet test dotCoverParallelizationIssue.sln 和 dotnet test affected.proj,两者都使用 -maxcpucount:2。调查 traversal 项目执行如何调度列出的测试项目;当工作负载像 solution 运行时一样均衡,并且复现确认了并行执行时,即可完成。
由索引模型根据 Issue 内容生成。
描述
Hi!
For the same set of test projects, tests that are run from .sln file are executed faster than tests, that are run from traversal project file.
How it looks in Process Explorer:
For a solution with dozens of test projects, when tests are run from traversal project, they are split among nodes, but when a node finishes its tests the node does not "steal" work from other nodes. As a result, one node does the most part of the work.
How to reproduce:
See instructions in https://github.com/batkaevruslan/dotCoverParallelizationIssue (ignore repo name, as at first we thought it's dotCover fault).
We tested it on several machines\OS with sdk 7.0.401 and got similar results:
~/Repos/batkaevruslan/dotCoverParallelizationIssue (main*) » /usr/bin/time -h dotnet test dotCoverParallelizationIssue.sln -maxcpucount:2
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests1.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests3.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests4.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests5.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 10 s - Tests6.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 30 s - Tests2.dll (net7.0)
31.71s real 6.47s user 1.51s sys
~/Repos/batkaevruslan/dotCoverParallelizationIssue (main*) » /usr/bin/time -h dotnet test affected.proj -maxcpucount:2 -v:q
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests1.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests4.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 10 s - Tests6.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 30 s - Tests2.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests3.dll (net7.0)
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 1 s - Tests5.dll (net7.0)
35.04s real 6.28s user 1.70s sys
Pay attention to the second run: Tests3.dll and Tests5.dll could have been executed in parallel with Tests2.dll, but they haven't.
- 主要语言
- C#
- 星标
- 513
- 派生
- 94
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/MSBuildSdks 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
microsoft/MSBuildSdks#653 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
microsoft/MSBuildSdks#652 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
microsoft/MSBuildSdks#646 ·
-
难度 4/5 3-5 天 新手友好度 25/100
microsoft/MSBuildSdks#644 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
microsoft/MSBuildSdks#642 ·
查看 microsoft/MSBuildSdks 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
Bug: Needs Replicating
难度 2/5 1-3 小时 新手友好度 62/100
space-wizards/RobustToolbox#7189 ·
维护者通常 1 天内回复
-
affected/v17 area/frontend type/bug
难度 2/5 1-3 小时 新手友好度 68/100
umbraco/Umbraco-CMS#24491 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/microsoft-ui-reactor#1460 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
CodeForFire/lagebuch#912 ·
维护者通常 1 天内回复