| Alexus Allen | 1177f3c | 2022-07-07 00:23:16 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2022 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | <configuration description="Runs SurfaceFlingerPerfTests metric instrumentation."> |
| 17 | <option name="test-suite-tag" value="apct" /> |
| 18 | <option name="test-suite-tag" value="apct-metric-instrumentation" /> |
| 19 | <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> |
| 20 | <option name="cleanup-apks" value="true" /> |
| 21 | <option name="install-arg" value="-t" /> |
| 22 | <option name="test-file-name" value="SurfaceFlingerPerfTests.apk" /> |
| 23 | </target_preparer> |
| 24 | |
| 25 | <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> |
| 26 | <option name="force-skip-system-props" value="true" /> |
| 27 | <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> |
| 28 | <option name="run-command" value="cmd window dismiss-keyguard" /> |
| 29 | <option name="run-command" value="cmd package compile -m speed android.perftests.surfaceflinger" /> |
| 30 | </target_preparer> |
| 31 | |
| 32 | <!-- Needed for pushing the trace config file --> |
| 33 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> |
| 34 | <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| 35 | <option name="push-file" key="trace_config_detailed.textproto" value="/data/misc/perfetto-traces/trace_config.textproto" /> |
| 36 | </target_preparer> |
| 37 | |
| 38 | <!-- Needed for storing the perfetto trace files in the sdcard/test_results--> |
| 39 | <option name="isolated-storage" value="false" /> |
| 40 | |
| 41 | <test class="com.android.tradefed.testtype.AndroidJUnitTest" > |
| 42 | <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" /> |
| 43 | <option name="package" value="android.perftests.surfaceflinger" /> |
| 44 | <option name="hidden-api-checks" value="false"/> |
| 45 | |
| 46 | <!-- Listener related args for collecting the traces and waiting for the device to stabilize. --> |
| 47 | <option name="device-listeners" value="android.device.collectors.ProcLoadListener,android.device.collectors.PerfettoListener,android.device.collectors.SimpleperfListener" /> |
| 48 | |
| 49 | <!-- Guarantee that user defined RunListeners will be running before any of the default listeners defined in this runner. --> |
| 50 | <option name="instrumentation-arg" key="newRunListenerMode" value="true" /> |
| 51 | |
| Vishnu Nair | 451eb13 | 2022-09-09 16:26:16 -0700 | [diff] [blame] | 52 | <option name="instrumentation-arg" key="profiling-iterations" value="525" /> |
| Alexus Allen | 1177f3c | 2022-07-07 00:23:16 +0000 | [diff] [blame] | 53 | <!-- PerfettoListener related arguments --> |
| 54 | <option name="instrumentation-arg" key="perfetto_config_text_proto" value="true" /> |
| 55 | <option name="instrumentation-arg" key="perfetto_config_file" value="trace_config.textproto" /> |
| 56 | |
| 57 | <!-- SimpleperfListener related arguments --> |
| 58 | <option name="instrumentation-arg" key="report" value="true" /> |
| Vishnu Nair | 451eb13 | 2022-09-09 16:26:16 -0700 | [diff] [blame] | 59 | <option name="instrumentation-arg" key="arguments" value="-g" /> |
| Alexus Allen | 1177f3c | 2022-07-07 00:23:16 +0000 | [diff] [blame] | 60 | <option name="instrumentation-arg" key="events_to_record" value="instructions,cpu-cycles,raw-l3d-cache-refill,sched:sched_waking" /> |
| 61 | <option name="instrumentation-arg" key="processes_to_record" value="surfaceflinger" /> |
| Vishnu Nair | 451eb13 | 2022-09-09 16:26:16 -0700 | [diff] [blame] | 62 | <option name="instrumentation-arg" key="symbols_to_report" value=""commit;android::SurfaceFlinger::commit(;composite;android::SurfaceFlinger::composite("" /> |
| 63 | |
| 64 | <!-- should match profiling-iterations --> |
| 65 | <option name="instrumentation-arg" key="test_iterations" value="525" /> |
| Alexus Allen | 1177f3c | 2022-07-07 00:23:16 +0000 | [diff] [blame] | 66 | |
| 67 | <!-- ProcLoadListener related arguments --> |
| 68 | <!-- Wait for device last minute threshold to reach 3 with 2 minute timeout before starting the test run --> |
| 69 | <option name="instrumentation-arg" key="procload-collector:per_run" value="true" /> |
| 70 | <option name="instrumentation-arg" key="proc-loadavg-threshold" value="3" /> |
| 71 | <option name="instrumentation-arg" key="proc-loadavg-timeout" value="120000" /> |
| 72 | <option name="instrumentation-arg" key="proc-loadavg-interval" value="10000" /> |
| 73 | |
| 74 | </test> |
| 75 | |
| 76 | <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> |
| 77 | <option name="directory-keys" value="/data/local/tmp/SurfaceFlingerPerfTests" /> |
| 78 | <!-- Needed for pulling the collected trace config on to the host --> |
| 79 | <option name="pull-pattern-keys" value="perfetto_file_path" /> |
| 80 | <option name="pull-pattern-keys" value="simpleperf_file_path" /> |
| 81 | </metrics_collector> |
| 82 | |
| 83 | </configuration> |