Skip to content

Commit

Permalink
Upload GPU frame times for Impeller on Android/iOS. (#136565)
Browse files Browse the repository at this point in the history
These values will be 0 until flutter/engine#46846 and flutter/engine#46796 roll into the framework.
  • Loading branch information
jonahwilliams authored Oct 14, 2023
1 parent 2963b74 commit 1956474
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions dev/devicelab/lib/tasks/perf_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,22 @@ class PerfTest {
);
}

final bool recordGPU;
switch (deviceOperatingSystem) {
case DeviceOperatingSystem.ios:
recordGPU = true;
case DeviceOperatingSystem.android:
case DeviceOperatingSystem.androidArm:
case DeviceOperatingSystem.androidArm64:
recordGPU = enableImpeller ?? false;
case DeviceOperatingSystem.fake:
case DeviceOperatingSystem.fuchsia:
case DeviceOperatingSystem.linux:
case DeviceOperatingSystem.macos:
case DeviceOperatingSystem.windows:
recordGPU = false;
}

// TODO(liyuqian): Remove isAndroid restriction once
// https://github.com/flutter/flutter/issues/61567 is fixed.
final bool isAndroid = deviceOperatingSystem == DeviceOperatingSystem.android;
Expand Down Expand Up @@ -1321,6 +1337,12 @@ class PerfTest {
if (data['90hz_frame_percentage'] != null) '90hz_frame_percentage',
if (data['120hz_frame_percentage'] != null) '120hz_frame_percentage',
if (data['illegal_refresh_rate_frame_count'] != null) 'illegal_refresh_rate_frame_count',
if (recordGPU) ...<String>[
if (data['average_gpu_frame_time'] != null) 'average_gpu_frame_time',
if (data['90th_percentile_gpu_frame_time'] != null) '90th_percentile_gpu_frame_time',
if (data['99th_percentile_gpu_frame_time'] != null) '99th_percentile_gpu_frame_time',
if (data['worst_gpu_frame_time'] != null) 'worst_gpu_frame_time',
]
],
);
});
Expand Down

0 comments on commit 1956474

Please sign in to comment.