Performance test for MotionPredictor
The motion prediction is needed when we are trying to achieve the smallest possible end-to-end touch latency. The API is designed to be running directly inside the UI thread, while processing touch. Therefore, it's important for this class to be fast. To monitor regressions in the performance of this class, introduce the performance tests. Results: com.android.perftests.core (2 Tests) [1/2] android.input.MotionPredictorBenchmark#timeRecordAndPredict: PASSED (8.634s) perfetto_file_path: /sdcard/test_results/android.input.MotionPredictorBenchmark_timeRecordAndPredict/PerfettoListener/perfetto_android.input.MotionPredictorBenchmark_timeRecordAndPredict-1.perfetto-trace timeRecordAndPredict_mean (ns): 31594 timeRecordAndPredict_median (ns): 31285 timeRecordAndPredict_min (ns): 30983 timeRecordAndPredict_standardDeviation: 638 [2/2] android.input.MotionPredictorBenchmark#timeCreatePredictor: PASSED (6.973s) perfetto_file_path: /sdcard/test_results/android.input.MotionPredictorBenchmark_timeCreatePredictor/PerfettoListener/perfetto_android.input.MotionPredictorBenchmark_timeCreatePredictor-1.perfetto-trace timeCreatePredictor_mean (ns): 71687 timeCreatePredictor_median (ns): 68660 timeCreatePredictor_min (ns): 66266 timeCreatePredictor_standardDeviation: 6056 Bug: 167946763 Test: atest MotionPredictorBenchmark MotionPredictorTest Change-Id: I2415f796b2f99717ba915b3da2979d70302c235d
Loading
Please register or sign in to comment