Reland GC benchmark changes again (#82042)

This commit is contained in:
Dan Field
2021-05-07 12:29:01 -07:00
committed by GitHub
parent a69f2f3b14
commit 99a947c3e5
5 changed files with 66 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
Future<void> main() async {
const String fileName = 'large_image_changer';
const String fileName = 'animated_image';
test('Animate for 250 frames', () async {
final FlutterDriver driver = await FlutterDriver.connect();

View File

@@ -9,8 +9,11 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.android;
await task(DevToolsMemoryTest(
await task(PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/animated_image.dart',
'animated_image',
measureCpuGpu: true,
measureMemory: true,
).run);
}

View File

@@ -705,6 +705,7 @@ class PerfTest {
final String deviceId = device.deviceId;
await flutter('drive', options: <String>[
'--no-dds', // TODO(dnfield): consider removing when https://github.com/flutter/flutter/issues/81707 is fixed
'--no-android-gradle-daemon',
'-v',
'--verbose-system-logs',
@@ -777,6 +778,8 @@ const List<String> _kCommonScoreKeys = <String>[
'worst_frame_rasterizer_time_millis',
'90th_percentile_frame_rasterizer_time_millis',
'99th_percentile_frame_rasterizer_time_millis',
'new_gen_gc_count',
'old_gen_gc_count',
];
class PerfTestWithSkSL extends PerfTest {
@@ -868,6 +871,7 @@ class PerfTestWithSkSL extends PerfTest {
_flutterPath,
<String>[
'run',
'--no-dds',
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
...<String>[
'--device-timeout', '5',