Allow programmatic collection of timeline data
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
This was mentioned in https://github.com/Dart-Code/Dart-Code/issues/4106#issuecomment-1632883559. While debugging some analyzer performance issues I've been using the DevTools timeline and the `dart:developer` Timeline APIs to record events.
This works well, but there's a fair bit of manual work to connect DevTools, trigger the actions in the server, then fresh the timeline.
It would be really nice if I could call some APIs (for example in a test) that starts recording timeline data, executes a bunch of actions (that record timings using the Timeline APIs) and then dump to a file that can be opened in DevTools to review afterwards. This would make it easy to make very repeatable timings to evaluate changes.
I could imagine this also being useful for Flutter apps and tests. It could be neat if next to the Run/Debug links in VS Code above tests, there was a "Profile" (or similar) link, which runs the tests while capturing a trace, then opens the Timeline afterwards.
cc @kenzieschmoll
贡献指南
调研方向
首先阅读现有的 DevTools 时间线录制流程,以及 issue 中提到的 dart:developer Timeline API。定义程序化录制、执行操作、导出 trace 以及在 DevTools 中打开它的范围;done 应意味着之后可以复查可重复的计时捕获结果。
由索引模型根据 Issue 内容生成。
评估
- 领域
- devtools, performance
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100