add benchmark for animated complex opacity (#102532)

This commit is contained in:
Jonah Williams
2022-04-25 18:14:06 -07:00
committed by GitHub
parent f15295cc91
commit 63574cf76a
8 changed files with 103 additions and 0 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(createAnimatedComplexOpacityPerfE2ETest());
}

View File

@@ -577,6 +577,13 @@ TaskFunction createGradientStaticPerfE2ETest() {
).run;
}
TaskFunction createAnimatedComplexOpacityPerfE2ETest() {
return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test/animated_complex_opacity_perf_e2e.dart',
).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) {