Add cull opacity perf test to device lab (#25381)
For https://github.com/flutter/flutter/issues/24712
This test verifies that https://github.com/flutter/engine/pull/6923 will speedup the average rasterize time of this test from ~150ms to ~10ms
Please see non-auto-generated files in https://github.com/flutter/flutter/pull/25381/commits/37b21d9fb4756a8d8d12ae0def1d0640740c8818
diff --git a/dev/devicelab/bin/tasks/cull_opacity_perf__timeline_summary.dart b/dev/devicelab/bin/tasks/cull_opacity_perf__timeline_summary.dart
new file mode 100644
index 0000000..ffab86c
--- /dev/null
+++ b/dev/devicelab/bin/tasks/cull_opacity_perf__timeline_summary.dart
@@ -0,0 +1,14 @@
+// Copyright 2018 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 'dart:async';
+
+import 'package:flutter_devicelab/tasks/perf_tests.dart';
+import 'package:flutter_devicelab/framework/adb.dart';
+import 'package:flutter_devicelab/framework/framework.dart';
+
+Future<void> main() async {
+ deviceOperatingSystem = DeviceOperatingSystem.android;
+ await task(createCullOpacityPerfTest());
+}
diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart
index 1356713..4594537 100644
--- a/dev/devicelab/lib/tasks/perf_tests.dart
+++ b/dev/devicelab/lib/tasks/perf_tests.dart
@@ -30,6 +30,14 @@
).run;
}
+TaskFunction createCullOpacityPerfTest() {
+ return PerfTest(
+ '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
+ 'test_driver/cull_opacity_perf.dart',
+ 'cull_opacity_perf',
+ ).run;
+}
+
TaskFunction createFlutterGalleryStartupTest() {
return StartupTest(
'${flutterDirectory.path}/examples/flutter_gallery',
diff --git a/dev/devicelab/manifest.yaml b/dev/devicelab/manifest.yaml
index 649df48..f100596 100644
--- a/dev/devicelab/manifest.yaml
+++ b/dev/devicelab/manifest.yaml
@@ -112,6 +112,13 @@
stage: devicelab
required_agent_capabilities: ["mac/android"]
+ cull_opacity_perf__timeline_summary:
+ description: >
+ Measures the runtime performance of culling opacity widgets on Android.
+ stage: devicelab
+ required_agent_capabilities: ["mac/android"]
+ flaky: true # mark a new test as flaky
+
flavors_test:
description: >
Checks that flavored builds work on Android.