美文网首页
dumpsys gfxinfo

dumpsys gfxinfo

作者: 码上述Andy | 来源:发表于2019-06-22 21:35 被阅读0次

利用dumpsys gfxinfo dump出详细的帧数据信息可以看出应用的渲染性能。
命令

adb shell dumpsys gfxinfo [应用包名]

比如:adb shell dumpsys gfxinfo jni.chowen.com.nativeapp

generic_x86:/ $ dumpsys gfxinfo jni.chowen.com.nativeapp
Applications Graphics Acceleration Info:
Uptime: 36707608 Realtime: 36707608

** Graphics info for pid 21525 [jni.chowen.com.nativeapp] **

Stats since: 36445599641804ns
Total frames rendered: 2
Janky frames: 1 (50.00%)
50th percentile: 150ms
90th percentile: 150ms
95th percentile: 150ms
99th percentile: 150ms
Number Missed Vsync: 1
Number High input latency: 0
Number Slow UI thread: 1
Number Slow bitmap uploads: 0
Number Slow issue draw commands: 1
HISTOGRAM: 5ms=0 6ms=0 7ms=0 8ms=0 9ms=0 10ms=1 11ms=0 12ms=0 13ms=0 14ms=0 15ms=0 16ms=0 17ms=0 18ms=0 19ms=0 20ms=0 21ms=0 22ms=0 23ms=0 24ms=0 25ms=0 26ms=0 27ms=0 28ms=0 29ms=0 30ms=0 31ms=0 32ms=0 34ms=0 36ms=0 38ms=0 40ms=0 42ms=0 44ms=0 46ms=0 48ms=0 53ms=0 57ms=0 61ms=0 65ms=0 69ms=0 73ms=0 77ms=0 81ms=0 85ms=0 89ms=0 93ms=0 97ms=0 101ms=0 105ms=0 109ms=0 113ms=0 117ms=0 121ms=0 125ms=0 129ms=0 133ms=0 150ms=1 200ms=0 250ms=0 300ms=0 350ms=0 400ms=0 450ms=0 500ms=0 550ms=0 600ms=0 650ms=0 700ms=0 750ms=0 800ms=0 850ms=0 900ms=0 950ms=0 1000ms=0 1050ms=0 1100ms=0 1150ms=0 1200ms=0 1250ms=0 1300ms=0 1350ms=0 1400ms=0 1450ms=0 1500ms=0 1550ms=0 1600ms=0 1650ms=0 1700ms=0 1750ms=0 1800ms=0 1850ms=0 1900ms=0 1950ms=0 2000ms=0 2050ms=0 2100ms=0 2150ms=0 2200ms=0 2250ms=0 2300ms=0 2350ms=0 2400ms=0 2450ms=0 2500ms=0 2550ms=0 2600ms=0 2650ms=0 2700ms=0 2750ms=0 2800ms=0 2850ms=0 2900ms=0 2950ms=0 3000ms=0 3050ms=0 3100ms=0 3150ms=0 3200ms=0 3250ms=0 3300ms=0 3350ms=0 3400ms=0 3450ms=0 3500ms=0 3550ms=0 3600ms=0 3650ms=0 3700ms=0 3750ms=0 3800ms=0 3850ms=0 3900ms=0 3950ms=0 4000ms=0 4050ms=0 4100ms=0 4150ms=0 4200ms=0 4250ms=0 4300ms=0 4350ms=0 4400ms=0 4450ms=0 4500ms=0 4550ms=0 4600ms=0 4650ms=0 4700ms=0 4750ms=0 4800ms=0 4850ms=0 4900ms=0 4950ms=0
Caches:
Current memory usage / total memory usage (bytes):
  TextureCache                0 / 49766400
  Layers total          0 (numLayers = 0)
  RenderBufferCache           0 /  4147200
  GradientCache               0 /  1048576
  PathCache                   0 /  8294400
  TessellationCache           0 /  1048576
  TextDropShadowCache         0 /  4147200
  PatchCache                  0 /   131072
  FontRenderer A8         28483 /  1183744
    A8   texture 0        28483 /  1183744
  FontRenderer RGBA           0 /        0
  FontRenderer total      28483 /  1183744
Other:
  FboCache                    0 /        0
Total memory usage:
  1183744 bytes, 1.13 MB


Pipeline=FrameBuilder
Profile data in ms:

    jni.chowen.com.nativeapp/jni.chowen.com.nativeapp.MainActivity/android.view.ViewRootImpl@a3b3733 (visibility=0)
View hierarchy:

  jni.chowen.com.nativeapp/jni.chowen.com.nativeapp.MainActivity/android.view.ViewRootImpl@a3b3733
  16 views, 17.64 kB of display lists


Total ViewRootImpl: 1
Total Views:        16
Total DisplayList:  17.64 kB

Graphics info for pid 21525 [jni.chowen.com.nativeapp] :当前进程
Stats since: 36445599641804ns
Total frames rendered: 2 :本次dump搜索的帧数
Janky frames: 1 (50.00%) :耗时的帧数(占比)
50th percentile: 150ms
90th percentile: 150ms
95th percentile: 150ms
99th percentile: 150ms
Number Missed Vsync: 1 :同步失败的帧数
Number High input latency: 0 :处理input时间超时的帧数
Number Slow UI thread: 1 :因为UI耗时的帧数
Number Slow bitmap uploads: 0 :因上传bitmap导致耗时的帧数
Number Slow issue draw commands: 1 :因绘制导致耗时的帧数
HISTOGRAM: 5ms=0 6ms=0 7ms=0 8ms=0 9ms=0 10ms=1 11ms=0 12ms=0 13ms=0 14ms=0 15ms=0
5ms=0:0-5ms耗时的帧数帧数为0
6ms=0:5ms-7ms耗时帧数为0
10ms=1:9ms-10ms耗时帧数为1
依次类推....
上面的这些帧数据通反映了你的app的渲染性能和稳定性。
gfxinfo能看出有问题,但如果需要看具体问题需要结合 TraceView或者systrace

相关文章

网友评论

      本文标题:dumpsys gfxinfo

      本文链接:https://www.haomeiwen.com/subject/vhjvqctx.html