Benchmark for semantic overhead during transitions (#10678)
* Benchmark for semantic overhead during transitions * review comments
This commit is contained in:
committed by
GitHub
parent
7158646ba7
commit
e2d4f9242e
@@ -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,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user