通过android 自带adb命令:
1、打开开发者选项:点击手机版本号7次,打开开发者选项。
2、打开开发者选项,下拉菜单,选择GPU呈现模式分析,选择在adb shell dumpsys gfxinfo中
3、复现需要测试的场景,执行如下命令:
adb shell dumpsys gfxinfo <package name>
如settings app
adb shell dumpsys gfxinfo com.android.settings
Applications Graphics Acceleration Info:
Uptime: 63254067 Realtime: 64407287
** Graphics info for pid 19251 [com.android.settings] **
Stats since: 58705283085105ns
Total frames rendered: 3099
Janky frames: 214 (6.91%)
50th percentile: 11ms
90th percentile: 15ms
95th percentile: 18ms
99th percentile: 36ms
Number Missed Vsync: 37
Number High input latency: 0
Number Slow UI thread: 113
Number Slow bitmap uploads: 4
Number Slow issue draw commands: 58
HISTOGRAM: 5ms=393 6ms=160 7ms=128 8ms=210 9ms=263 10ms=377 11ms=405 12ms=373 13ms=273 14ms=178 15ms=88 16ms=50 17ms=37 18ms=34 19ms=25 20ms=16 21ms=9 22ms=9 23ms=9 24ms=4 25ms=2 26ms=5 27ms=1 28ms=4 29ms=5 30ms=1 31ms=1 32ms=3 34ms=2 36ms=4 38ms=2 40ms=1 42ms=3 44ms=1 46ms=2 48ms=2 53ms=2 57ms=2 61ms=2 65ms=0 69ms=1 73ms=3 77ms=3 81ms=0 85ms=