fix(report): compute total duration from task timing and show start/end tooltip#1761
Open
yuyutaotao wants to merge 2 commits intofix/timing-in-reportfrom
Open
fix(report): compute total duration from task timing and show start/end tooltip#1761yuyutaotao wants to merge 2 commits intofix/timing-in-reportfrom
yuyutaotao wants to merge 2 commits intofix/timing-in-reportfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
apps/report/src/components/sidebar/index.tsx中新增timingRange计算,遍历groupedDump.executions[].tasks[]的timing.start/timing.end,得到earliest、latest和duration,并以duration作为总时长来源(有值时优先使用)。totalTimeCost的来源改为优先使用timingRange.duration,若不存在则回退到playwright_test_duration(保持向后兼容)。Tooltip包裹timeCostStrElement,tooltip 内容展示Start/End,使用fullTimeStrWithMilliseconds格式化时间戳。fullTimeStrWithMilliseconds从packages/visualizer/src/utils导出(在packages/visualizer/src/index.tsx添加导出),以便在报告组件中复用统一的时间格式化方法。Testing
Codex Task