如何衡量应用启动时方法的执行时间

时间:2019-07-22 12:50:00

标签: android android-studio

如何使用Android Studio的Profiler查找应用启动时每种方法的执行时间。我需要找到导致应用启动缓慢的方法。

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

Here,您有官方文档。有据可查。这取决于您使用的Android Studio版本。

但简而言之:

Android Studio 3.4.1

enter image description here

enter image description here

您点击CPU和“记录”。

enter image description here

完成录制后,您可以选择要查看的内容。 enter image description here

将鼠标悬停在要查看的方法上。

enter image description here

相关问题