mirror of
https://github.com/encounter/flutter.git
synced 2026-03-30 11:10:35 -07:00
Remove unused observer and raise the waiting time (#46626)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
0268510480
commit
69728097bd
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user