Adding first semantics perf test (#10649)
* Adding first semantics perf test * review commnts and analyzer fixes * fix analyzer warning
This commit is contained in:
committed by
GitHub
parent
0774c5194b
commit
8bf17192f6
38
dev/devicelab/bin/tasks/complex_layout_semantics_perf.dart
Normal file
38
dev/devicelab/bin/tasks/complex_layout_semantics_perf.dart
Normal 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',
|
||||
]);
|
||||
});
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user