Upgrade to Pro — share decks privately, control downloads, hide ads and more …

モニタリングでパフォーマンス改善入門

AsamiShimizu
December 26, 2023

 モニタリングでパフォーマンス改善入門

DroidKaigi 2023発表内容です

AsamiShimizu

December 26, 2023
Tweet

More Decks by AsamiShimizu

Other Decks in Programming

Transcript

  1. PassiveTestでわかるもの tag: ActivityManger • ANR ActivityManager system_server E ANR in

    com.example.performancesample (com.example.performancesample/.MainActivity) PID: 4729 Reason: Input dispatching timed out (53dcb44 com.example.performancesample/com.example.performancesample.MainActivity (server) is not responding. Waited 5002ms for MotionEvent) Parent: com.example.performancesample/.MainActivity ErrorId: ce233c9f-5740-4f23-b9db-3327368d60ca Frozen: false
  2. PassiveTestでわかるもの tag: OpenGLRenderer • mainThreadが700ms以上遅れる(=freeze 状態) OpenGLRenderer com.example.performancesample I Davey!

    duration=1258ms; Flags=0, FrameTimelineVsyncId=1661510, IntendedVsync=9642633836262, Vsync=9642885158517, InputEventId=0, HandleInputStart=9642892361353, AnimationStart=9642892364061, PerformTraversalsStart=9642944791618, DrawStart=9642944943493, FrameDeadline=9642920872578, FrameInterval=9642892343644, FrameStartTime=16754817, SyncQueued=9643651549605, SyncStart=9643651594657, IssueDrawCommandsStart=9643651644189, SwapBuffers=9643871400513, FrameCompleted=9643892793692, DequeueBufferDuration=11875, QueueBufferDuration=163177, GpuCompleted=9643892793692, SwapBuffersCompleted=9643871867127, DisplayPresentTime=0, CommandSubmissionCompleted=9643871400513,
  3. Perfetto Viewer Custom Logを⼊れることもできます(PhotoTestClick13) Text(text = index.toString(), modifier = Modifier.clickable

    { Trace.beginSection("PhotoTextClick $index") TimeUnit.SECONDS.sleep(5) Trace.endSection() } )
  4. モニタリングの種類 • Android Vitals • Firebase Performance Monitoring • JankStats

    • Benchmarkの継続的インテグレー ションでの実⾏
  5. Android Vitals • Google Play Consoleで確認可能 • 品質情報のログがGooglePlayに より⾃動で収集される ◦

    安定性 ◦ パフォーマンス指標 ◦ バッテリー使⽤量 ◦ 権限拒否