如何在 Android Studio 3.1 调试器中使用 "Overhead" 选项卡?

How to use "Overhead" tab in Android Studio 3.1 debugger?

在调试我的应用程序时,我注意到 Android Studio 3.1 中调试器选项卡下的一个选项卡 - Overhead。它列出了我的一些方法名称和时间(毫秒)指标:

我找不到关于此选项卡的任何信息、它的用途以及如何使用它 use/read,这很遗憾,因为它似乎很有用。

任何人都可以给出一些解释或指向文档吗?

TL;DR:它向您展示了使用调试器的 "performance loss"。

由于 Android Studio 基于 IntelliJ IDEA,您可以在此处找到有关此功能的一些信息:

https://blog.jetbrains.com/idea/2017/09/whats-new-in-intellij-idea-2017-3-eap/

As its name suggests, this tab shows you the overhead added either when stepping over the code or when Data Renderers evaluates values to display them in Variables, Watches, or other places.

更多信息(包括显示该功能的小 gif)在这里:

https://blog.jetbrains.com/idea/2017/12/intellij-idea-2017-3-debugger-improvements/

他们说的地方:

Debugging an application comes with an inevitable cost. While we may know this, it’s not always obvious what this might be. IntelliJ IDEA 2017.3 comes with a way to visualise this cost. There’s now a new tab, Overhead, which gives a view of the cost of debugging. [...] As you can see, this window shows how much time was spent stepping over code, or rendering values with custom Type Renderers in watches and variables. Seeing this overhead may help you to understand the difference in behaviour between running and debugging your application, and will help you to reduce unnecessary performance costs when debugging.

这是显示其用法的 gif 动画: