Here is a quick primer for profiling in Eclipse using YourKit:
1) Lets take an (over)simplified piece of (buggy) code as an example to see how:
2) Now lets write a small unit test to catch our bug:
3) Now lets download YourKit and integrate it with your eclipse as follows:

4) Follow the prompts and your eclipse will show the nice YourKit icon as:

5) Lets first run our test not pushing our JVM too much:

6) Lets push our JVM a little now:
Aha, an OutOfMemoryError, time to profile.....7) Lets see how to Profile as a JUnit Test:

8) YourKit window pops up like this and in our simple scenario, we find our bottleneck ;-)

9) Cool, isn't it!?!
Happy YourKitting!!
No comments:
Post a Comment