2

I would like to find the performance bottlenecks in my Java application. Since everything runs in terms of microseconds it is not at all obvious which are the functions that are called most often and consume the largest part of this (short) time. I work in Eclipse (Luna) and would prefer a profiler that integrates with the IDE.

I have tried searching the web for free Java profiling eclipse-plugins but all that I find is outdated.

  • JVM Monitor - fails to display any JVM instances in the JVM explorer
  • TPTP - seems to be unmaintained for years
  • Java Profiler (by Tim Webb) - seems to be outdated too.

Do you have any suggestions? Thanks!

Friedrich Gretz
  • 535
  • 4
  • 14
  • 1
    Well, VisualVM works nicely at least. – Kayaman Aug 18 '15 at 13:17
  • [*This works*](http://stackoverflow.com/a/378024/23771) in any language. If your code runs too fast, put a temporary long loop around it. The thing is, you are expecting your bottlenecks to be specific routines that are "called most often" and "consume" too much time. You are likely to find that the code is actually pretty sensible, from a local perspective. It is better to think in wholistic terms of what the program is doing, and why, and for what fraction of time. This will reveal speedups that would otherwise be missed. – Mike Dunlavey Aug 18 '15 at 14:14

2 Answers2

1

Maybe JProfiler could be worth a try for you! An alternative could be YourKit. Both are commercial but there exist free trial versions.

Marc Giombetti
  • 819
  • 1
  • 8
  • 20
0

Thank you for the quick replies. From the offered choices (interrupt the code manually, use trial versions and using the standalone VisualVM) I chose the last option and it works really well.

The only inconvenience I find is that - since it is not integrated - I have to build in a point where my application pauses its execution and waits for user input. This gives me time to select the VM to be monitored in VisualVM after which I return to my application, hit ENTER and see the results piling up in VisualVM. A bit cumbersome but it works.

Friedrich Gretz
  • 535
  • 4
  • 14