Unverified Commit 6eb45d35 authored by Yuqian Li's avatar Yuqian Li Committed by GitHub

Rename needsMeasureCpuGpu to measureCpuGpu (#64000)

parent 38e0c258
...@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart'; ...@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createComplexLayoutScrollPerfTest(needsMeasureCpuGpu: true)); await task(createComplexLayoutScrollPerfTest(measureCpuGpu: true));
} }
...@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart'; ...@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createPostBackdropFilterPerfTest(needsMeasureCpuGpu: true)); await task(createPostBackdropFilterPerfTest(measureCpuGpu: true));
} }
...@@ -9,5 +9,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -9,5 +9,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createSimpleAnimationPerfTest(needsMeasureCpuGpu: true)); await task(createSimpleAnimationPerfTest(measureCpuGpu: true));
} }
...@@ -15,12 +15,12 @@ import 'package:flutter_devicelab/framework/framework.dart'; ...@@ -15,12 +15,12 @@ import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart'; import 'package:flutter_devicelab/framework/utils.dart';
import 'package:flutter_devicelab/tasks/track_widget_creation_enabled_task.dart'; import 'package:flutter_devicelab/tasks/track_widget_creation_enabled_task.dart';
TaskFunction createComplexLayoutScrollPerfTest({bool needsMeasureCpuGpu = false}) { TaskFunction createComplexLayoutScrollPerfTest({bool measureCpuGpu = false}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/complex_layout', '${flutterDirectory.path}/dev/benchmarks/complex_layout',
'test_driver/scroll_perf.dart', 'test_driver/scroll_perf.dart',
'complex_layout_scroll_perf', 'complex_layout_scroll_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
).run; ).run;
} }
...@@ -109,42 +109,42 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() { ...@@ -109,42 +109,42 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() {
).run; ).run;
} }
TaskFunction createBackdropFilterPerfTest({bool needsMeasureCpuGpu = false}) { TaskFunction createBackdropFilterPerfTest({bool measureCpuGpu = false}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart', 'test_driver/run_app.dart',
'backdrop_filter_perf', 'backdrop_filter_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/backdrop_filter_perf_test.dart', testDriver: 'test_driver/backdrop_filter_perf_test.dart',
).run; ).run;
} }
TaskFunction createPostBackdropFilterPerfTest({bool needsMeasureCpuGpu = false}) { TaskFunction createPostBackdropFilterPerfTest({bool measureCpuGpu = false}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart', 'test_driver/run_app.dart',
'post_backdrop_filter_perf', 'post_backdrop_filter_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/post_backdrop_filter_perf_test.dart', testDriver: 'test_driver/post_backdrop_filter_perf_test.dart',
).run; ).run;
} }
TaskFunction createSimpleAnimationPerfTest({bool needsMeasureCpuGpu = false}) { TaskFunction createSimpleAnimationPerfTest({bool measureCpuGpu = false}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart', 'test_driver/run_app.dart',
'simple_animation_perf', 'simple_animation_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/simple_animation_perf_test.dart', testDriver: 'test_driver/simple_animation_perf_test.dart',
).run; ).run;
} }
TaskFunction createAnimatedPlaceholderPerfTest({bool needsMeasureCpuGpu = false}) { TaskFunction createAnimatedPlaceholderPerfTest({bool measureCpuGpu = false}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart', 'test_driver/run_app.dart',
'animated_placeholder_perf', 'animated_placeholder_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/animated_placeholder_perf_test.dart', testDriver: 'test_driver/animated_placeholder_perf_test.dart',
).run; ).run;
} }
...@@ -368,7 +368,7 @@ class PerfTest { ...@@ -368,7 +368,7 @@ class PerfTest {
this.testDirectory, this.testDirectory,
this.testTarget, this.testTarget,
this.timelineFileName, { this.timelineFileName, {
this.needsMeasureCpuGpu = false, this.measureCpuGpu = false,
this.testDriver, this.testDriver,
this.needsFullTimeline = true, this.needsFullTimeline = true,
this.benchmarkScoreKeys, this.benchmarkScoreKeys,
...@@ -385,7 +385,7 @@ class PerfTest { ...@@ -385,7 +385,7 @@ class PerfTest {
/// The test file to run on the host. /// The test file to run on the host.
final String testDriver; final String testDriver;
/// Whether to collect CPU and GPU metrics. /// Whether to collect CPU and GPU metrics.
final bool needsMeasureCpuGpu; final bool measureCpuGpu;
/// Whether to collect full timeline, meaning if `--trace-startup` flag is needed. /// Whether to collect full timeline, meaning if `--trace-startup` flag is needed.
final bool needsFullTimeline; final bool needsFullTimeline;
...@@ -405,8 +405,8 @@ class PerfTest { ...@@ -405,8 +405,8 @@ class PerfTest {
/// 'average_vsync_transitions_missed', /// 'average_vsync_transitions_missed',
/// '90th_percentile_vsync_transitions_missed', /// '90th_percentile_vsync_transitions_missed',
/// '99th_percentile_vsync_transitions_missed', /// '99th_percentile_vsync_transitions_missed',
/// if (needsMeasureCpuGpu) 'average_cpu_usage', /// if (measureCpuGpu) 'average_cpu_usage',
/// if (needsMeasureCpuGpu) 'average_gpu_usage', /// if (measureCpuGpu) 'average_gpu_usage',
/// ] /// ]
/// ``` /// ```
final List<String> benchmarkScoreKeys; final List<String> benchmarkScoreKeys;
...@@ -476,8 +476,8 @@ class PerfTest { ...@@ -476,8 +476,8 @@ class PerfTest {
'average_vsync_transitions_missed', 'average_vsync_transitions_missed',
'90th_percentile_vsync_transitions_missed', '90th_percentile_vsync_transitions_missed',
'99th_percentile_vsync_transitions_missed', '99th_percentile_vsync_transitions_missed',
if (needsMeasureCpuGpu) 'average_cpu_usage', if (measureCpuGpu) 'average_cpu_usage',
if (needsMeasureCpuGpu) 'average_gpu_usage', if (measureCpuGpu) 'average_gpu_usage',
], ],
); );
}); });
...@@ -518,13 +518,13 @@ class PerfTestWithSkSL extends PerfTest { ...@@ -518,13 +518,13 @@ class PerfTestWithSkSL extends PerfTest {
String testDirectory, String testDirectory,
String testTarget, String testTarget,
String timelineFileName, { String timelineFileName, {
bool needsMeasureCpuGpu = false, bool measureCpuGpu = false,
String testDriver, String testDriver,
}) : super( }) : super(
testDirectory, testDirectory,
testTarget, testTarget,
timelineFileName, timelineFileName,
needsMeasureCpuGpu: needsMeasureCpuGpu, measureCpuGpu: measureCpuGpu,
testDriver: testDriver, testDriver: testDriver,
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment