Adding first semantics perf test (#10649)

* Adding first semantics perf test

* review commnts and analyzer fixes

* fix analyzer warning
This commit is contained in:
Michael Goderbauer
2017-06-13 12:49:07 -07:00
committed by GitHub
parent 0774c5194b
commit 8bf17192f6
8 changed files with 182 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
// Copyright (c) 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_devicelab/framework/adb.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:path/path.dart' as p;
void main() {
task(() async {
deviceOperatingSystem = DeviceOperatingSystem.android;
final Device device = await devices.workingDevice;
await device.unlock();
final String deviceId = device.deviceId;
await flutter('packages', options: <String>['get']);
final String complexLayoutPath = p.join(flutterDirectory.path, 'dev', 'benchmarks', 'complex_layout');
await inDirectory(complexLayoutPath, () async {
await flutter('drive', options: <String>[
'-v',
'--profile',
'--trace-startup', // Enables "endless" timeline event buffering.
'-t',
p.join(complexLayoutPath, 'test_driver', 'semantics_perf.dart'),
'-d',
deviceId,
]);
});
final String dataPath = p.join(complexLayoutPath, 'build', 'complex_layout_semantics_perf.json');
return new TaskResult.successFromFile(file(dataPath), benchmarkScoreKeys: <String>[
'initialSemanticsTreeCreation',
]);
});
}

View File

@@ -133,6 +133,13 @@ tasks:
required_agent_capabilities: ["linux/android"]
flaky: true
complex_layout_semantics_perf:
description: >
Measures duration of building the initial semantics tree.
stage: devicelab
required_agent_capabilities: ["linux/android"]
flaky: true
# iOS on-device tests
channels_integration_test_ios: