Measure CPU/GPU with the simple animation test (#63124)
This commit is contained in:
parent
e49a57660d
commit
2296bb154b
@ -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());
|
await task(createComplexLayoutScrollPerfTest(needsMeasureCpuGpu: true));
|
||||||
}
|
}
|
||||||
|
@ -12,15 +12,15 @@ import 'package:path/path.dart' as path;
|
|||||||
|
|
||||||
import 'package:flutter_devicelab/framework/adb.dart';
|
import 'package:flutter_devicelab/framework/adb.dart';
|
||||||
import 'package:flutter_devicelab/framework/framework.dart';
|
import 'package:flutter_devicelab/framework/framework.dart';
|
||||||
import 'package:flutter_devicelab/framework/ios.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() {
|
TaskFunction createComplexLayoutScrollPerfTest({bool needsMeasureCpuGpu = 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,
|
||||||
).run;
|
).run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,8 +398,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) 'cpu_percentage',
|
/// if (needsMeasureCpuGpu) 'average_cpu_usage',
|
||||||
/// if (needsMeasureCpuGpu) 'gpu_percentage',
|
/// if (needsMeasureCpuGpu) 'average_gpu_usage',
|
||||||
/// ]
|
/// ]
|
||||||
/// ```
|
/// ```
|
||||||
final List<String> benchmarkScoreKeys;
|
final List<String> benchmarkScoreKeys;
|
||||||
@ -455,12 +455,6 @@ class PerfTest {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsMeasureCpuGpu) {
|
|
||||||
await inDirectory<void>('$testDirectory/build', () async {
|
|
||||||
data.addAll(await measureIosCpuGpu(deviceId: deviceId));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return TaskResult.success(
|
return TaskResult.success(
|
||||||
data,
|
data,
|
||||||
benchmarkScoreKeys: benchmarkScoreKeys ?? <String>[
|
benchmarkScoreKeys: benchmarkScoreKeys ?? <String>[
|
||||||
@ -475,8 +469,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) 'cpu_percentage',
|
if (needsMeasureCpuGpu) 'average_cpu_usage',
|
||||||
if (needsMeasureCpuGpu) 'gpu_percentage',
|
if (needsMeasureCpuGpu) 'average_gpu_usage',
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -647,11 +647,12 @@ tasks:
|
|||||||
stage: devicelab_ios
|
stage: devicelab_ios
|
||||||
required_agent_capabilities: ["mac/ios"]
|
required_agent_capabilities: ["mac/ios"]
|
||||||
|
|
||||||
# simple_animation_perf_iphonexs:
|
simple_animation_perf_ios:
|
||||||
# description: >
|
description: >
|
||||||
# Measure CPU/GPU usage percentages of a simple animation.
|
Measure CPU/GPU usage percentages of a simple animation.
|
||||||
# stage: devicelab_ios
|
stage: devicelab_ios
|
||||||
# required_agent_capabilities: ["mac/iphonexs"]
|
required_agent_capabilities: ["mac/ios"]
|
||||||
|
flaky: true
|
||||||
|
|
||||||
smoke_catalina_start_up_ios:
|
smoke_catalina_start_up_ios:
|
||||||
description: >
|
description: >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user