2019-11-27 23:04:02 +00:00
|
|
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
2017-06-14 15:09:05 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
import 'package:flutter_devicelab/tasks/gallery.dart';
|
|
|
|
import 'package:flutter_devicelab/framework/adb.dart';
|
|
|
|
import 'package:flutter_devicelab/framework/framework.dart';
|
|
|
|
|
2018-10-04 16:44:23 +00:00
|
|
|
Future<void> main() async {
|
2017-06-14 15:09:05 +00:00
|
|
|
deviceOperatingSystem = DeviceOperatingSystem.android;
|
|
|
|
await task(() async {
|
|
|
|
final TaskResult withoutSemantics = await createGalleryTransitionTest()();
|
|
|
|
final TaskResult withSemantics = await createGalleryTransitionTest(semanticsEnabled: true)();
|
|
|
|
|
|
|
|
final List<String> benchmarkScoreKeys = <String>[];
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
2020-01-07 15:32:04 +00:00
|
|
|
for (final String key in withSemantics.benchmarkScoreKeys) {
|
2017-06-14 15:09:05 +00:00
|
|
|
final String deltaKey = 'delta_$key';
|
|
|
|
data[deltaKey] = withSemantics.data[key] - withoutSemantics.data[key];
|
|
|
|
data['semantics_$key'] = withSemantics.data[key];
|
|
|
|
data[key] = withoutSemantics.data[key];
|
|
|
|
benchmarkScoreKeys.add(deltaKey);
|
|
|
|
}
|
|
|
|
|
2018-09-12 06:29:29 +00:00
|
|
|
return TaskResult.success(data, benchmarkScoreKeys: benchmarkScoreKeys);
|
2017-06-14 15:09:05 +00:00
|
|
|
});
|
|
|
|
}
|