在使用 IntelliJ 进行调试时,有没有一种方法(或插件)可以找出每个线程占用了多少 CPU?

Is there a way (or plugin) to find out how much CPU each thread is taking while debugging with IntelliJ?

我正在 IntelliJ 中调试一个程序,需要查看每个线程消耗了多少 CPU。

我确实在使用 jvmtop,但我需要在每次停止和启动程序时使用进程 ID 手动 运行 它。

有什么办法可以自动完成吗? (最好通过 IntelliJ 中的某种机制或插件,尽管脚本也可以)

任何 Java 分析器,例如 YourKit,都可以向您显示此信息。您需要单独 运行 分析器;没有直接集成到 IntelliJ IDEA UI 中的分析器。