Add Impeller complex layout impeller benchmarks. (#139490)

These benchmarks do a nice job of showing CPU overhead, which is useful for many of the microoptimizations we've been doing.
This commit is contained in:
Jonah Williams
2023-12-04 11:23:26 -08:00
committed by GitHub
parent 8fe4e35ace
commit c421f65b3b
5 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
// 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 '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(createComplexLayoutScrollPerfTest(enableImpeller: true));
}

View File

@@ -0,0 +1,12 @@
// 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 '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(createComplexLayoutScrollPerfTest(enableImpeller: true, forceOpenGLES: true));
}

View File

@@ -28,6 +28,7 @@ TaskFunction createComplexLayoutScrollPerfTest({
bool measureCpuGpu = true,
bool badScroll = false,
bool? enableImpeller,
bool forceOpenGLES = false,
}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/complex_layout',
@@ -37,6 +38,7 @@ TaskFunction createComplexLayoutScrollPerfTest({
'complex_layout_scroll_perf',
measureCpuGpu: measureCpuGpu,
enableImpeller: enableImpeller,
forceOpenGLES: forceOpenGLES,
).run;
}