是否有IntelliJ Java Profiler [英] Is there an IntelliJ Java Profiler

查看:141
本文介绍了是否有IntelliJ Java Profiler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有类似于Matlab的IntelliJ的Profiler?

Is there a Profiler for IntelliJ like the one for Matlab?

假设你有这个代码

a = true;
i = 0;
while(a)
{
   if(a)
      i++
   // some fancy stuff which takes 1 second each loop
   if(i > 1e6) break;
}  

现在我运行代码

在Matlab中我打开Profiler后看起来像这样。

In Matlab it would look like this after I opened the Profiler

calls  time
     1  0.0      a = true;
     1  0.0      i = 0;
     1  0.0      while(a)
                 {
   1e3  1.0        if(a)
   1e3  0.4         i++
   1e3  1e3         // some fancy stuff which takes 1 second each loop
   1e3  1.2         if(i > 1e3) break;
                 }  


推荐答案

所有可用的分析器可以在IntelliJ中使用的Java将显示仅在方法级别聚合的调用时间。您可以使用VisualVM,JProfiler或YourKit,但只会显示摘要时间。

All profilers that are available for Java, which can be used in IntelliJ will show invocation times only aggregated on method level. You can use for example VisualVM, JProfiler or YourKit, but only summary time will be shown.

这篇关于是否有IntelliJ Java Profiler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆