Android Caton monitoring visualization tools: Caton and FPS

Android GPU rendering mode principle and the Caton dropped frames Analysis - https://www.jianshu.com/p/2ad8723865cc
  - common analysis, positioning Caton programs, system tools : 1 TraceView; 2. Systrace; 3 .. command line adb shell dumpsys SurfaceFlinger --latency com ... package name

  - third-party library program:
  1. the Matrix-TraceCanary:  https://github.com/Tencent/matrix
micro-channel detection scheme Caton, ASM instrumented methods used, and stack support fps acquired location, but needs its own the method asm instrumented id to analyze their own stack, high positioning accuracy, performance, consumption, pity is no interface display, the code has some invasive. If you use online can be considered.
  BlockCanaryEx 2.: https://github.com/seiginonakama/BlockCanaryEx
main principle is to use loop () printed in the Journal, loop printed in the Journal () can see HONGYANG of this blog Android UI performance optimization detection applications UI Caton, supports sampling method, known execution time and execution count all the methods of the main thread, because of the need to obtain the status cpu, and some system of large performance overhead, does not support the show fps, especially when detected Caton, let interface cards Dayton for a long time. Before our project is to use this tool.
  Fpsviewer 3.: https://github.com/SilenceDut/fpsviewer/
utilizing Choreographer.FrameCallback to monitor and calculate Caton Fps, the asynchronous thread periodic samples of the current frame time consuming than custom threshold, the frame save analysis, does not affect the normal process, the time needed to be on display, location.
  fpsviewer- real-time display fps, monitoring visualization tools Android Caton, can show fps, the average frame rate over time, and the proportion of real-time frame rate range, and have access to visualization tools Caton stack. Invasive low, get a stack by sampling the asynchronous thread, non-invasive codes, performance, consumption can be ignored, abnormal performance monitoring data collection and analysis of items, sorting output display corresponding stack to help developers create higher quality application.

Guess you like

Origin blog.csdn.net/ShareUs/article/details/90678025