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
This commit is contained in:
committed by
GitHub
parent
e6a7419603
commit
9f285aa9d9
@@ -0,0 +1,19 @@
|
||||
// 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';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(ReportedDurationTest(
|
||||
ReportedDurationTestFlavor.release,
|
||||
'${flutterDirectory.path}/examples/image_list',
|
||||
'lib/main.dart',
|
||||
'com.example.image_list',
|
||||
|
||||
@@ -609,9 +609,26 @@ class MemoryTest {
|
||||
}
|
||||
}
|
||||
|
||||
class ReportedDurationTest {
|
||||
ReportedDurationTest(this.project, this.test, this.package, this.durationPattern);
|
||||
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 {
|
||||
ReportedDurationTest(this.flavor, this.project, this.test, this.package, this.durationPattern);
|
||||
|
||||
final ReportedDurationTestFlavor flavor;
|
||||
final String project;
|
||||
final String test;
|
||||
final String package;
|
||||
@@ -645,7 +662,7 @@ class ReportedDurationTest {
|
||||
print('launching $project$test on device...');
|
||||
await flutter('run', options: <String>[
|
||||
'--verbose',
|
||||
'--release',
|
||||
'--${_reportedDurationTestToString(flavor)}',
|
||||
'--no-resident',
|
||||
'-d', device.deviceId,
|
||||
test,
|
||||
|
||||
@@ -353,7 +353,14 @@ tasks:
|
||||
|
||||
image_list_reported_duration:
|
||||
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
|
||||
required_agent_capabilities: ["linux/android"]
|
||||
flaky: true
|
||||
|
||||
Reference in New Issue
Block a user