File tree Expand file tree Collapse file tree 5 files changed +17
-12
lines changed
dev/benchmarks/macrobenchmarks Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class TextPage extends StatelessWidget {
1111 Widget build (BuildContext context) {
1212 return Material (
1313 child: Column (
14+ mainAxisAlignment: MainAxisAlignment .center,
1415 children: const < Widget > [
1516 SizedBox (
1617 width: 200 ,
Original file line number Diff line number Diff line change @@ -12,11 +12,7 @@ void main() {
1212 macroPerfTestE2E (
1313 'textfield_perf' ,
1414 kTextRouteName,
15- // The driver version doesn't have this delay because the delay caused
16- // by the communication between the host and the test device is long enough
17- // for the driver test, but there isn't such delay in this host independent
18- // test.
19- pageDelay: const Duration (milliseconds: 50 ),
15+ pageDelay: const Duration (seconds: 1 ),
2016 body: (WidgetController controller) async {
2117 final Finder textfield = find.byKey (const ValueKey <String >('basic-textfield' ));
2218 controller.tap (textfield);
Original file line number Diff line number Diff line change @@ -25,9 +25,16 @@ void macroPerfTestE2E(
2525 ControlCallback ? body,
2626 ControlCallback ? setup,
2727}) {
28- macroPerfTestMultiPageE2E (testName, < ScrollableButtonRoute > [
29- ScrollableButtonRoute (kScrollableName, routeName),
30- ]);
28+ macroPerfTestMultiPageE2E (
29+ testName,
30+ < ScrollableButtonRoute > [
31+ ScrollableButtonRoute (kScrollableName, routeName),
32+ ],
33+ pageDelay: pageDelay,
34+ duration: duration,
35+ body: body,
36+ setup: setup,
37+ );
3138}
3239
3340void macroPerfTestMultiPageE2E (
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ void main() {
1111 macroPerfTest (
1212 'textfield_perf' ,
1313 kTextRouteName,
14+ pageDelay: const Duration (seconds: 1 ),
1415 driverOps: (FlutterDriver driver) async {
1516 final SerializableFinder textfield = find.byValueKey ('basic-textfield' );
1617 driver.tap (textfield);
Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ void macroPerfTest(
5252 }
5353
5454 timeline = await driver.traceAction (() async {
55- final Future <void > durationFuture = Future <void >.delayed (duration);
56- if (driverOps != null ) {
57- await driverOps (driver);
58- }
55+ final Future <void > durationFuture = Future <void >.delayed (duration);
56+ if (driverOps != null ) {
57+ await driverOps (driver);
58+ }
5959 await durationFuture;
6060 });
6161 });
You can’t perform that action at this time.
0 commit comments