[Feature]: Test runner captures and source-maps stacks that it never uses
维护者通常 1 天内回复
@microsoft-playwright-automation 已经在做这个了。
开始于 2026年11月24日。
- #44338 来自 @microsoft-playwright-automation —— 未关闭
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- performance, testing
调研方向
Start in fixtureRunner.ts where _stepInfo.stack is set for built-in fixture steps, and in packages/isomorphic/manualPromise.ts at LongStandingScope._race(). Read closed PR #44326 for the already-tested implementation, then run the test-runner and manual-promise tests covering step metadata and close-error stacks. Done means built-in fixture steps carry stack: [], _race() reads .stack only when cloning a close error, and existing stack output stays unchanged.
由索引模型根据 Issue 内容生成。
描述
Problem
Two hot paths in the worker format stacks that nobody reads:
- Built-in fixture steps (
page,context,request, and about 30 more) have no user location. InfixtureRunner.ts,_stepInfo.stackisundefined, sotestInfo._addStep()captures and source-maps a full raw stack, then filters it to 0 frames. This happens about 60 times per test. LongStandingScope._race()inpackages/isomorphic/manualPromise.tsreadsnew Error().stackon every call. The formatted stack is used only when the scope closes during the race.
Measurements
CPU profile of a 24-test suite, Apple Silicon, Chromium headless shell, 1 worker, median of 5 runs:
| Now | With both changes | |
|---|---|---|
| Worker CPU time | 995 ms | 806 ms (−19%) |
Proposed approach
- Give built-in fixture steps
stack: []. User fixtures keep their registration location. - In
_race(), keep theErrorand read.stackonly when it clones a close error. V8 records the frames when theErroris constructed, so close messages stay the same.
One difference: built-in fixture steps no longer report user locations injected by a custom Error.prepareStackTrace formatter. With the default formatter, they never had a location.
Already implemented and tested in #44326, which was closed only to file this issue first. Both are small, low-risk performance fixes. Reopening #44326 is the fastest path; it is ready for review.
- 主要语言
- TypeScript
- 星标
- 100k
- 派生
- 6.9k
- 平均合并
- 16 小时 18 分钟
- 30 天内合并 PR
- 281
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/playwright 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
microsoft/playwright#44340 ·
维护者通常 1 天内回复
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)可能已有人在做 @lazerg 于 2 天前认领。 未关闭agent-triage-done
难度 2/5 1-3 小时 新手友好度 62/100
microsoft/playwright#44289 · 2 条评论 ·
维护者通常 1 天内回复
-
[Feature]: expose per-project workers on FullProject for reporters可能已有人在做 @microsoft-playwright-automation 今天认领。 未关闭agent-triage-done
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/playwright#44264 · 5 条评论 ·
维护者通常 1 天内回复
-
[Feature]: Skip PNG decode and diff when a screenshot matches its baseline byte for byte可能已有人在做 @microsoft-playwright-automation 今天认领。 未关闭agent-triage-done
难度 2/5 1-3 小时 新手友好度 30/100
microsoft/playwright#44333 · 2 条评论 ·
维护者通常 1 天内回复
-
[Bug]: `.resolves.not` and `.rejects.not` pass when a promise settles the wrong way可能已有人在做 @microsoft-playwright-automation 今天认领。 未关闭agent-triage-done
难度 3/5 半天 新手友好度 55/100
microsoft/playwright#44331 · 2 条评论 ·
维护者通常 1 天内回复
查看 microsoft/playwright 的全部 Issue
相似的 Issue
-
chore
难度 2/5 1-3 小时 新手友好度 82/100
drydocs/meridian#1503 · 1 条评论 ·
维护者通常 2 天内回复
-
refactor review: high
难度 2/5 1-3 小时 新手友好度 72/100
1lck/Lithe-IDEA#2376 ·
维护者通常 1 天内回复
-
bug extension mcp
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
primer/primitives#1426 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
danielmiessler/LifeOS#2941 ·
维护者通常 4 天内回复