Commit 69728097 authored by liyuqian's avatar liyuqian Committed by Flutter GitHub Bot

Remove unused observer and raise the waiting time (#46626)

parent 02685104
......@@ -16,20 +16,9 @@ Future<void> endOfAnimation() async {
} while (SchedulerBinding.instance.hasScheduledFrame);
}
int iteration = 0;
class LifecycleObserver extends WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
debugPrint('==== MEMORY BENCHMARK ==== $state ====');
debugPrint('This was lifecycle event number $iteration in this instance');
}
}
Future<void> main() async {
runApp(const MacrobenchmarksApp(initialRoute: kLargeImagesRouteName));
await endOfAnimation();
await Future<void>.delayed(const Duration(milliseconds: 50));
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
WidgetsBinding.instance.addObserver(LifecycleObserver());
}
......@@ -30,7 +30,7 @@ class FastScrollLargeImagesMemoryTest extends MemoryTest {
await launchApp();
await recordStart();
await device.shellExec('input', <String>['swipe', '0 1500 0 0 50']);
await Future<void>.delayed(const Duration(milliseconds: 10000));
await Future<void>.delayed(const Duration(milliseconds: 15000));
await recordEnd();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment