Unverified Commit 9f285aa9 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Introduce image_list performance benchmark that runs on jit(debug) build. (#35424)

* Introduce image_list performance benchmark that runs on jit(debug) build.

We want to track performance of debug build because ongoing work on reducing the cost of spanwing new isolate will impact jit(debug) more than it will aot(release) configurations.

* Newlines and spaces
parent e6a74196
// Copyright 2016 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/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
await task(ReportedDurationTest(
ReportedDurationTestFlavor.debug,
'${flutterDirectory.path}/examples/image_list',
'lib/main.dart',
'com.example.image_list',
RegExp(r'===image_list=== all loaded in ([\d]+)ms.'),
).run);
}
...@@ -10,6 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -10,6 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
await task(ReportedDurationTest( await task(ReportedDurationTest(
ReportedDurationTestFlavor.release,
'${flutterDirectory.path}/examples/image_list', '${flutterDirectory.path}/examples/image_list',
'lib/main.dart', 'lib/main.dart',
'com.example.image_list', 'com.example.image_list',
......
...@@ -609,9 +609,26 @@ class MemoryTest { ...@@ -609,9 +609,26 @@ class MemoryTest {
} }
} }
enum ReportedDurationTestFlavor {
debug, profile, release
}
String _reportedDurationTestToString(ReportedDurationTestFlavor flavor) {
switch (flavor) {
case ReportedDurationTestFlavor.debug:
return 'debug';
case ReportedDurationTestFlavor.profile:
return 'profile';
case ReportedDurationTestFlavor.release:
return 'release';
}
throw ArgumentError('Unexpected value for enum $flavor');
}
class ReportedDurationTest { class ReportedDurationTest {
ReportedDurationTest(this.project, this.test, this.package, this.durationPattern); ReportedDurationTest(this.flavor, this.project, this.test, this.package, this.durationPattern);
final ReportedDurationTestFlavor flavor;
final String project; final String project;
final String test; final String test;
final String package; final String package;
...@@ -645,7 +662,7 @@ class ReportedDurationTest { ...@@ -645,7 +662,7 @@ class ReportedDurationTest {
print('launching $project$test on device...'); print('launching $project$test on device...');
await flutter('run', options: <String>[ await flutter('run', options: <String>[
'--verbose', '--verbose',
'--release', '--${_reportedDurationTestToString(flavor)}',
'--no-resident', '--no-resident',
'-d', device.deviceId, '-d', device.deviceId,
test, test,
......
...@@ -353,7 +353,14 @@ tasks: ...@@ -353,7 +353,14 @@ tasks:
image_list_reported_duration: image_list_reported_duration:
description: > description: >
Measures image loading performance. Measures image loading performance on release (aot) build.
stage: devicelab
required_agent_capabilities: ["linux/android"]
flaky: true
image_list_jit_reported_duration:
description: >
Measures image loading performance on debug (jit) build.
stage: devicelab stage: devicelab
required_agent_capabilities: ["linux/android"] required_agent_capabilities: ["linux/android"]
flaky: true flaky: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment