Benchmark for semantic overhead during transitions (#10678)

* Benchmark for semantic overhead during transitions

* review comments
This commit is contained in:
Michael Goderbauer
2017-06-14 08:09:05 -07:00
committed by GitHub
parent 7158646ba7
commit e2d4f9242e
6 changed files with 71 additions and 4 deletions

View File

@@ -12,12 +12,16 @@ import '../framework/framework.dart';
import '../framework/ios.dart';
import '../framework/utils.dart';
TaskFunction createGalleryTransitionTest() {
return new GalleryTransitionTest();
TaskFunction createGalleryTransitionTest({ bool semanticsEnabled: false }) {
return new GalleryTransitionTest(semanticsEnabled: semanticsEnabled);
}
class GalleryTransitionTest {
GalleryTransitionTest({ this.semanticsEnabled: false });
final bool semanticsEnabled;
Future<TaskResult> call() async {
final Device device = await devices.workingDevice;
await device.unlock();
@@ -33,11 +37,15 @@ class GalleryTransitionTest {
await flutter('build', options: <String>['ios', '--profile']);
}
final String testDriver = semanticsEnabled
? 'transitions_perf_with_semantics.dart'
: 'transitions_perf.dart';
await flutter('drive', options: <String>[
'--profile',
'--trace-startup',
'-t',
'test_driver/transitions_perf.dart',
'test_driver/$testDriver',
'-d',
deviceId,
]);