Netbeans 6.5 Quicktip: Unit Tests And Profiler

With Netbeans it is easy to launch your JUnit tests with the Profiler. You just have to click on the file in the "Projects" Tag and choose "Profile File" (this works only in non-EJB-projects :-(). The profiler will be launchend and executed with all unit tests in the chosen class. It is fast and convenient way to find potential hotspots in advance. It is hard to find memory leaks this way, but you can check the performance of your algorithms... The profiler looks like this.


Hi Adam,

I had a bad experience in using the profiler in Netbeans. Sometimes that profiling session hangs when there is to much classes loaded in the perm gen space - such is the case for big projects with a lot of dependencies.

My response to this problem is to take the heap dump using jmap and use another tool - Eclipse Memory Leak Analyzer (this tool is free - built on top of eclipse).

It does all the things a profiler does except that it only analyzes that snapshot of the dump which is sufficient given that you already know which classes are involved for a particular profiling sessions.


Posted by Jerwin Louise Vergara Uy on January 03, 2009 at 07:22 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments