Add benchmarks to measure impact of alpha saveLayers in DisplayLists (#97336)
This commit is contained in:
@@ -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(createOpacityPeepholeColOfAlphaSaveLayerRowsPerfE2ETest());
|
||||
}
|
||||
@@ -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(createOpacityPeepholeGridOfAlphaSaveLayersPerfE2ETest());
|
||||
}
|
||||
@@ -519,6 +519,20 @@ TaskFunction createOpacityPeepholeFadeTransitionTextPerfE2ETest() {
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createOpacityPeepholeGridOfAlphaSaveLayersPerfE2ETest() {
|
||||
return PerfTest.e2e(
|
||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||
'test/opacity_peephole_grid_of_alpha_savelayers_perf_e2e.dart',
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createOpacityPeepholeColOfAlphaSaveLayerRowsPerfE2ETest() {
|
||||
return PerfTest.e2e(
|
||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||
'test/opacity_peephole_col_of_alpha_savelayer_rows_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) {
|
||||
|
||||
Reference in New Issue
Block a user