Add a perf test for picture raster cache (#45050)
This will catch issues like https://github.com/flutter/flutter/issues/44252, and this test is inspired by the `list_demo` sample app in https://github.com/flutter/flutter/issues/43083#issue-509586473 This is tested locally on a Moto G4 before and after the fix https://github.com/flutter/engine/pull/13710 The `average_frame_rasterizer_time_millis` of this test drops from ~5.4ms to ~4.9ms after that fix.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Copyright 2019 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(createPictureCachePerfTest());
|
||||
}
|
||||
@@ -72,6 +72,14 @@ TaskFunction createSimpleAnimationPerfTest({bool needsMeasureCpuGpu = false}) {
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createPictureCachePerfTest() {
|
||||
return PerfTest(
|
||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||
'test_driver/picture_cache_perf.dart',
|
||||
'picture_cache_perf',
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createFlutterGalleryStartupTest() {
|
||||
return StartupTest(
|
||||
'${flutterDirectory.path}/examples/flutter_gallery',
|
||||
|
||||
@@ -167,6 +167,12 @@ tasks:
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["mac/android"]
|
||||
|
||||
picture_cache_perf__timeline_summary:
|
||||
description: >
|
||||
Measures the runtime performance of raster caching many pictures on Android.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["mac/android"]
|
||||
|
||||
cubic_bezier_perf__timeline_summary:
|
||||
description: >
|
||||
Measures the runtime performance of cubic bezier animations on Android.
|
||||
|
||||
Reference in New Issue
Block a user