0

I have a very long program with hundreds of methods. In my attempt to enhance the performance of the program, I want to monitor the time taken in each method or for loop to see where should I start to optimize the code.

is there any eclipse plugin or software tool to do that? I mean to calculate time taken in each method without adding tons of lines of code?

Mohamed Taher Alrefaie
  • 15,698
  • 9
  • 48
  • 66
  • There is something called appDynamics agent (limited free version), you may try that. – kosa Jun 20 '13 at 16:09
  • Take a [*look at this*](http://stackoverflow.com/a/2425217/23771). Basically the idea is to generalize the method you would use to find an infinite loop. – Mike Dunlavey Jun 20 '13 at 22:42

2 Answers2

1

Visualvm has an excellent profiler.

I usually run my code in a hot loop and attach after the code warms up, but setting a breakpoint early in your code and then attaching works well also. Think you'll really like visualvm, I use it to track down the performance bottlenecks in code at least once a week.

electroCutie
  • 194
  • 1
  • 8
0

jvisualvm it is in jdk and jre AFAIR

zimi
  • 1,586
  • 12
  • 27