[devicelab] track performance of animated image filter (#115850)

* [devicelab] track performance of animated image filter

* ++

* make animations repeat and add dispose

* make duration more consistently 10sec
This commit is contained in:
Jonah Williams
2022-11-28 17:59:19 -08:00
committed by GitHub
parent f777c9f651
commit dfa3d33328
11 changed files with 146 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
// Copyright 2014 The Flutter 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/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.android;
await task(createAnimatedComplexImageFilteredPerfE2ETest());
}

View File

@@ -627,6 +627,17 @@ TaskFunction createAnimatedComplexOpacityPerfE2ETest({
).run;
}
TaskFunction createAnimatedComplexImageFilteredPerfE2ETest({
bool enableImpeller = false,
}) {
return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test/animated_complex_image_filtered_perf_e2e.dart',
enableImpeller: enableImpeller,
).run;
}
Map<String, dynamic> _average(List<Map<String, dynamic>> results, int iterations) {
final Map<String, dynamic> tally = <String, dynamic>{};
for (final Map<String, dynamic> item in results) {