Skip to content

Commit 661f53d

Browse files
authored
Add back main() methods to benchmark benches. (#156083)
Dart performance suite needs this since it builds and launches those flutter benchmarks independently Cf. flutter/flutter#154446
1 parent a9047e9 commit 661f53d

File tree

9 files changed

+63
-0
lines changed

9 files changed

+63
-0
lines changed

dev/benchmarks/microbenchmarks/lib/geometry/matrix_utils_transform_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,10 @@ Future<void> execute() async {
136136
);
137137
printer.printToStdout();
138138
}
139+
140+
//
141+
// Note that the benchmark is normally run by benchmark_collection.dart.
142+
//
143+
Future<void> main() async {
144+
return execute();
145+
}

dev/benchmarks/microbenchmarks/lib/geometry/rrect_contains_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ Future<void> execute() async {
2828
);
2929
printer.printToStdout();
3030
}
31+
32+
//
33+
// Note that the benchmark is normally run by benchmark_collection.dart.
34+
//
35+
Future<void> main() async {
36+
return execute();
37+
}

dev/benchmarks/microbenchmarks/lib/gestures/gesture_detector_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ Future<void> execute() async {
4949
);
5050
printer.printToStdout();
5151
}
52+
53+
//
54+
// Note that the benchmark is normally run by benchmark_collection.dart.
55+
//
56+
Future<void> main() async {
57+
return execute();
58+
}

dev/benchmarks/microbenchmarks/lib/gestures/velocity_tracker_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ Future<void> execute() async {
5757

5858
printer.printToStdout();
5959
}
60+
61+
//
62+
// Note that the benchmark is normally run by benchmark_collection.dart.
63+
//
64+
Future<void> main() async {
65+
return execute();
66+
}

dev/benchmarks/microbenchmarks/lib/language/sync_star_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,10 @@ int sumIterable(Iterable<int> values) {
8989
}
9090
return result;
9191
}
92+
93+
//
94+
// Note that the benchmark is normally run by benchmark_collection.dart.
95+
//
96+
Future<void> main() async {
97+
return execute();
98+
}

dev/benchmarks/microbenchmarks/lib/language/sync_star_semantics_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,10 @@ Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoList(List<InlineSpa
117117
assert(workingLabel != null);
118118
return result;
119119
}
120+
121+
//
122+
// Note that the benchmark is normally run by benchmark_collection.dart.
123+
//
124+
Future<void> main() async {
125+
return execute();
126+
}

dev/benchmarks/microbenchmarks/lib/stocks/animation_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,10 @@ Future<void> execute(BenchmarkingBinding binding) async {
9090
}
9191
printer.printToStdout();
9292
}
93+
94+
//
95+
// Note that the benchmark is normally run by benchmark_collection.dart.
96+
//
97+
Future<void> main() async {
98+
return execute(BenchmarkingBinding());
99+
}

dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,10 @@ Future<void> execute() async {
6565
);
6666
printer.printToStdout();
6767
}
68+
69+
//
70+
// Note that the benchmark is normally run by benchmark_collection.dart.
71+
//
72+
Future<void> main() async {
73+
return execute();
74+
}

dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ Future<void> execute() async {
6060
);
6161
printer.printToStdout();
6262
}
63+
64+
//
65+
// Note that the benchmark is normally run by benchmark_collection.dart.
66+
//
67+
Future<void> main() async {
68+
return execute();
69+
}

0 commit comments

Comments
 (0)