File tree 5 files changed +17
-12
lines changed
dev/benchmarks/macrobenchmarks
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 {
11
11
Widget build (BuildContext context) {
12
12
return Material (
13
13
child: Column (
14
+ mainAxisAlignment: MainAxisAlignment .center,
14
15
children: const < Widget > [
15
16
SizedBox (
16
17
width: 200 ,
Original file line number Diff line number Diff line change @@ -12,11 +12,7 @@ void main() {
12
12
macroPerfTestE2E (
13
13
'textfield_perf' ,
14
14
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 ),
20
16
body: (WidgetController controller) async {
21
17
final Finder textfield = find.byKey (const ValueKey <String >('basic-textfield' ));
22
18
controller.tap (textfield);
Original file line number Diff line number Diff line change @@ -25,9 +25,16 @@ void macroPerfTestE2E(
25
25
ControlCallback ? body,
26
26
ControlCallback ? setup,
27
27
}) {
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
+ );
31
38
}
32
39
33
40
void macroPerfTestMultiPageE2E (
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ void main() {
11
11
macroPerfTest (
12
12
'textfield_perf' ,
13
13
kTextRouteName,
14
+ pageDelay: const Duration (seconds: 1 ),
14
15
driverOps: (FlutterDriver driver) async {
15
16
final SerializableFinder textfield = find.byValueKey ('basic-textfield' );
16
17
driver.tap (textfield);
Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ void macroPerfTest(
52
52
}
53
53
54
54
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
+ }
59
59
await durationFuture;
60
60
});
61
61
});
You can’t perform that action at this time.
0 commit comments