Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e48e2e6a
Unverified
Commit
e48e2e6a
authored
Jun 03, 2020
by
Jim Graham
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rasterizer start times to timeline summaries (#58514)
parent
6c8d7b00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
timeline_summary.dart
packages/flutter_driver/lib/src/driver/timeline_summary.dart
+23
-10
timeline_summary_test.dart
...ter_driver/test/src/real_tests/timeline_summary_test.dart
+4
-0
No files found.
packages/flutter_driver/lib/src/driver/timeline_summary.dart
View file @
e48e2e6a
...
...
@@ -19,6 +19,12 @@ const JsonEncoder _prettyEncoder = JsonEncoder.withIndent(' ');
/// phase. Anything past that is in the danger of missing the frame as 60FPS.
const
Duration
kBuildBudget
=
Duration
(
milliseconds:
16
);
/// The name of the framework frame build events we need to filter or extract.
const
String
kBuildFrameEventName
=
'Frame'
;
/// The name of the engine frame rasterization events we need to filter or extract.
const
String
kRasterizeFrameEventName
=
'GPURasterizer::Draw'
;
/// Extracts statistics from a [Timeline].
class
TimelineSummary
{
/// Creates a timeline summary given a full timeline object.
...
...
@@ -84,6 +90,9 @@ class TimelineSummary {
/// The total number of frames recorded in the timeline.
int
countFrames
()
=>
_extractFrameDurations
().
length
;
/// The total number of rasterizer cycles recorded in the timeline.
int
countRasterizations
()
=>
_extractGpuRasterizerDrawDurations
().
length
;
/// Encodes this summary as JSON.
Map
<
String
,
dynamic
>
get
summaryJson
{
final
SceneDisplayLagSummarizer
sceneDisplayLagSummarizer
=
_sceneDisplayLagSummarizer
();
...
...
@@ -100,18 +109,22 @@ class TimelineSummary {
'worst_frame_rasterizer_time_millis'
:
computeWorstFrameRasterizerTimeMillis
(),
'missed_frame_rasterizer_budget_count'
:
computeMissedFrameRasterizerBudgetCount
(),
'frame_count'
:
countFrames
(),
'frame_rasterizer_count'
:
countRasterizations
(),
'frame_build_times'
:
_extractFrameDurations
()
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
'frame_rasterizer_times'
:
_extractGpuRasterizerDrawDurations
()
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
'frame_begin_times'
:
_extractBeginTimestamps
(
'Frame'
)
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
'frame_begin_times'
:
_extractBeginTimestamps
(
kBuildFrameEventName
)
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
'frame_rasterizer_begin_times'
:
_extractBeginTimestamps
(
kRasterizeFrameEventName
)
.
map
<
int
>((
Duration
duration
)
=>
duration
.
inMicroseconds
)
.
toList
(),
'average_vsync_transitions_missed'
:
sceneDisplayLagSummarizer
.
computeAverageVsyncTransitionsMissed
(),
'90th_percentile_vsync_transitions_missed'
:
sceneDisplayLagSummarizer
.
computePercentileVsyncTransitionsMissed
(
90.0
),
'99th_percentile_vsync_transitions_missed'
:
sceneDisplayLagSummarizer
.
computePercentileVsyncTransitionsMissed
(
99.0
)
'99th_percentile_vsync_transitions_missed'
:
sceneDisplayLagSummarizer
.
computePercentileVsyncTransitionsMissed
(
99.0
)
,
};
}
...
...
@@ -227,7 +240,7 @@ class TimelineSummary {
SceneDisplayLagSummarizer
_sceneDisplayLagSummarizer
()
=>
SceneDisplayLagSummarizer
(
_extractNamedEvents
(
kSceneDisplayLagEvent
));
List
<
Duration
>
_extractGpuRasterizerDrawDurations
()
=>
_extractBeginEndEvents
(
'GPURasterizer::Draw'
);
List
<
Duration
>
_extractGpuRasterizerDrawDurations
()
=>
_extractBeginEndEvents
(
kRasterizeFrameEventName
);
List
<
Duration
>
_extractFrameDurations
()
=>
_extractBeginEndEvents
(
'Frame'
);
List
<
Duration
>
_extractFrameDurations
()
=>
_extractBeginEndEvents
(
kBuildFrameEventName
);
}
packages/flutter_driver/test/src/real_tests/timeline_summary_test.dart
View file @
e48e2e6a
...
...
@@ -372,9 +372,11 @@ void main() {
'worst_frame_rasterizer_time_millis'
:
20.0
,
'missed_frame_rasterizer_budget_count'
:
2
,
'frame_count'
:
3
,
'frame_rasterizer_count'
:
3
,
'frame_build_times'
:
<
int
>[
17000
,
9000
,
19000
],
'frame_rasterizer_times'
:
<
int
>[
18000
,
10000
,
20000
],
'frame_begin_times'
:
<
int
>[
0
,
18000
,
28000
],
'frame_rasterizer_begin_times'
:
<
int
>[
0
,
18000
,
28000
],
'average_vsync_transitions_missed'
:
0.0
,
'90th_percentile_vsync_transitions_missed'
:
0.0
,
'99th_percentile_vsync_transitions_missed'
:
0.0
...
...
@@ -431,9 +433,11 @@ void main() {
'worst_frame_rasterizer_time_millis'
:
20.0
,
'missed_frame_rasterizer_budget_count'
:
2
,
'frame_count'
:
3
,
'frame_rasterizer_count'
:
3
,
'frame_build_times'
:
<
int
>[
17000
,
9000
,
19000
],
'frame_rasterizer_times'
:
<
int
>[
18000
,
10000
,
20000
],
'frame_begin_times'
:
<
int
>[
0
,
18000
,
28000
],
'frame_rasterizer_begin_times'
:
<
int
>[
0
,
18000
,
28000
],
'average_vsync_transitions_missed'
:
8.0
,
'90th_percentile_vsync_transitions_missed'
:
12.0
,
'99th_percentile_vsync_transitions_missed'
:
12.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment