Unverified Commit b8a39c15 authored by Yuqian Li's avatar Yuqian Li Committed by GitHub

Collect memory metrics (#65798)

parent 04e4b117
...@@ -16,5 +16,6 @@ Future<void> main() async { ...@@ -16,5 +16,6 @@ Future<void> main() async {
'test_driver/large_image_changer.dart', 'test_driver/large_image_changer.dart',
'large_image_changer', 'large_image_changer',
measureCpuGpu: true, measureCpuGpu: true,
measureMemory: true,
).run); ).run);
} }
...@@ -469,6 +469,7 @@ class PerfTest { ...@@ -469,6 +469,7 @@ class PerfTest {
this.testTarget, this.testTarget,
this.timelineFileName, { this.timelineFileName, {
this.measureCpuGpu = false, this.measureCpuGpu = false,
this.measureMemory = false,
this.saveTraceFile = false, this.saveTraceFile = false,
this.testDriver, this.testDriver,
this.needsFullTimeline = true, this.needsFullTimeline = true,
...@@ -481,6 +482,7 @@ class PerfTest { ...@@ -481,6 +482,7 @@ class PerfTest {
this.testDirectory, this.testDirectory,
this.testTarget, { this.testTarget, {
this.measureCpuGpu = false, this.measureCpuGpu = false,
this.measureMemory = false,
this.testDriver = 'test_driver/e2e_test.dart', this.testDriver = 'test_driver/e2e_test.dart',
this.needsFullTimeline = false, this.needsFullTimeline = false,
this.benchmarkScoreKeys = _kCommonScoreKeys, this.benchmarkScoreKeys = _kCommonScoreKeys,
...@@ -501,6 +503,8 @@ class PerfTest { ...@@ -501,6 +503,8 @@ class PerfTest {
final String testDriver; final String testDriver;
/// Whether to collect CPU and GPU metrics. /// Whether to collect CPU and GPU metrics.
final bool measureCpuGpu; final bool measureCpuGpu;
/// Whether to collect memory metrics.
final bool measureMemory;
/// 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;
/// Whether to save the trace timeline file `*.timeline.json`. /// Whether to save the trace timeline file `*.timeline.json`.
...@@ -593,6 +597,7 @@ class PerfTest { ...@@ -593,6 +597,7 @@ class PerfTest {
'99th_percentile_vsync_transitions_missed', '99th_percentile_vsync_transitions_missed',
if (measureCpuGpu) 'average_cpu_usage', if (measureCpuGpu) 'average_cpu_usage',
if (measureCpuGpu) 'average_gpu_usage', if (measureCpuGpu) 'average_gpu_usage',
if (measureMemory) ...<String>['average_memory_usage', '90th_percentile_memory_usage', '99th_percentile_memory_usage'],
], ],
); );
}); });
......
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