Rename needsMeasureCpuGpu to measureCpuGpu (#64000)

This commit is contained in:
Yuqian Li 2020-08-19 13:26:07 -07:00 committed by GitHub
parent 38e0c25823
commit 6eb45d35da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 21 deletions

View file

@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createComplexLayoutScrollPerfTest(needsMeasureCpuGpu: true));
await task(createComplexLayoutScrollPerfTest(measureCpuGpu: true));
}

View file

@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createPostBackdropFilterPerfTest(needsMeasureCpuGpu: true));
await task(createPostBackdropFilterPerfTest(measureCpuGpu: true));
}

View file

@ -9,5 +9,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createSimpleAnimationPerfTest(needsMeasureCpuGpu: true));
await task(createSimpleAnimationPerfTest(measureCpuGpu: true));
}

View file

@ -15,12 +15,12 @@ import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:flutter_devicelab/tasks/track_widget_creation_enabled_task.dart';
TaskFunction createComplexLayoutScrollPerfTest({bool needsMeasureCpuGpu = false}) {
TaskFunction createComplexLayoutScrollPerfTest({bool measureCpuGpu = false}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/complex_layout',
'test_driver/scroll_perf.dart',
'complex_layout_scroll_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
).run;
}
@ -109,42 +109,42 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() {
).run;
}
TaskFunction createBackdropFilterPerfTest({bool needsMeasureCpuGpu = false}) {
TaskFunction createBackdropFilterPerfTest({bool measureCpuGpu = false}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart',
'backdrop_filter_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/backdrop_filter_perf_test.dart',
).run;
}
TaskFunction createPostBackdropFilterPerfTest({bool needsMeasureCpuGpu = false}) {
TaskFunction createPostBackdropFilterPerfTest({bool measureCpuGpu = false}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart',
'post_backdrop_filter_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/post_backdrop_filter_perf_test.dart',
).run;
}
TaskFunction createSimpleAnimationPerfTest({bool needsMeasureCpuGpu = false}) {
TaskFunction createSimpleAnimationPerfTest({bool measureCpuGpu = false}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart',
'simple_animation_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/simple_animation_perf_test.dart',
).run;
}
TaskFunction createAnimatedPlaceholderPerfTest({bool needsMeasureCpuGpu = false}) {
TaskFunction createAnimatedPlaceholderPerfTest({bool measureCpuGpu = false}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart',
'animated_placeholder_perf',
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/animated_placeholder_perf_test.dart',
).run;
}
@ -368,7 +368,7 @@ class PerfTest {
this.testDirectory,
this.testTarget,
this.timelineFileName, {
this.needsMeasureCpuGpu = false,
this.measureCpuGpu = false,
this.testDriver,
this.needsFullTimeline = true,
this.benchmarkScoreKeys,
@ -385,7 +385,7 @@ class PerfTest {
/// The test file to run on the host.
final String testDriver;
/// 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.
final bool needsFullTimeline;
@ -405,8 +405,8 @@ class PerfTest {
/// 'average_vsync_transitions_missed',
/// '90th_percentile_vsync_transitions_missed',
/// '99th_percentile_vsync_transitions_missed',
/// if (needsMeasureCpuGpu) 'average_cpu_usage',
/// if (needsMeasureCpuGpu) 'average_gpu_usage',
/// if (measureCpuGpu) 'average_cpu_usage',
/// if (measureCpuGpu) 'average_gpu_usage',
/// ]
/// ```
final List<String> benchmarkScoreKeys;
@ -476,8 +476,8 @@ class PerfTest {
'average_vsync_transitions_missed',
'90th_percentile_vsync_transitions_missed',
'99th_percentile_vsync_transitions_missed',
if (needsMeasureCpuGpu) 'average_cpu_usage',
if (needsMeasureCpuGpu) 'average_gpu_usage',
if (measureCpuGpu) 'average_cpu_usage',
if (measureCpuGpu) 'average_gpu_usage',
],
);
});
@ -518,13 +518,13 @@ class PerfTestWithSkSL extends PerfTest {
String testDirectory,
String testTarget,
String timelineFileName, {
bool needsMeasureCpuGpu = false,
bool measureCpuGpu = false,
String testDriver,
}) : super(
testDirectory,
testTarget,
timelineFileName,
needsMeasureCpuGpu: needsMeasureCpuGpu,
measureCpuGpu: measureCpuGpu,
testDriver: testDriver,
);