Wait for frame rendering to stabilize before running the all_elements_bench benchmark (#81086)

This commit is contained in:
Jason Simmons 2021-04-23 20:29:03 -07:00 committed by GitHub
parent 643fc8d5f7
commit 992dba0c9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,10 @@ Future<void> main() async {
),
));
await SchedulerBinding.instance.endOfFrame;
// Wait for frame rendering to stabilize.
for (int i = 0; i < 5; i++) {
await SchedulerBinding.instance.endOfFrame;
}
final Stopwatch watch = Stopwatch();