Is there an IntelliJ Java Profiler

GavriYashar picture GavriYashar · Jan 15, 2014 · Viewed 39.3k times · Source

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

Let's say you have this code

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

Now I run the code

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;
                 }  

Answer

Jakub Kubrynski picture Jakub Kubrynski · Jan 15, 2014

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.