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
484f3f26
Unverified
Commit
484f3f26
authored
Sep 02, 2020
by
Yuqian Li
Committed by
GitHub
Sep 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add FrameTiming delay to watchPerformance (#64780)
parent
7fdd9218
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
e2e_utils.dart
...egration_tests/flutter_gallery/test_driver/e2e_utils.dart
+9
-0
No files found.
dev/integration_tests/flutter_gallery/test_driver/e2e_utils.dart
View file @
484f3f26
...
...
@@ -28,10 +28,19 @@ Future<void> watchPerformance(
}
return
true
;
}());
// The engine could batch FrameTimings and send them only once per second.
// Delay for a sufficient time so either old FrameTimings are flushed and not
// interfering our measurements here, or new FrameTimings are all reported.
Future
<
void
>
delayForFrameTimings
()
=>
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
2
));
await
delayForFrameTimings
();
// flush old FrameTimings
final
List
<
FrameTiming
>
frameTimings
=
<
FrameTiming
>[];
final
TimingsCallback
watcher
=
frameTimings
.
addAll
;
binding
.
addTimingsCallback
(
watcher
);
await
action
();
await
delayForFrameTimings
();
// make sure all FrameTimings are reported
binding
.
removeTimingsCallback
(
watcher
);
final
FrameTimingSummarizer
frameTimes
=
FrameTimingSummarizer
(
frameTimings
);
binding
.
reportData
=
<
String
,
dynamic
>{
reportKey:
frameTimes
.
summary
};
...
...
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