Profiling with NetBeans
Step 1: Downloading NetBeans
Download NetBeans 5.5 and the Profiling extension from [netbeans.info]. The Linux versions let itself easily instrall in /usr/local, and in my case picked up my Sun JVM without trouble.
Start NetBeans. In my case this was with /usr/local/netbeans-5.5/bin/netbeans.
Step 2: Calibrating the profiler
Setup the profiling environment by first calibrating the profiler. Go to Profile -> Advanced Commands -> Run Profiler Calibration... It will take a while, without apparent notification. Just wait.
Step 3: Setting up Eclipse to run Bioclipse with the profiler
Setup Eclipse to run Bioclipse to allow profiling with NetBeans. This is done by adding this by adding a line like this:
as VM argument, as can be seen in the below screenshot.
The exact string may differ upon your installation. NetBeans conveniently reports it when running the Attach Wizard. To access this wizard, go to Profile -> Attach Profiler..., and click the Attach Wizard button left under, see in the screenshot below.
Step 4: Attaching the profiler
Attaching an application to profile is done via Profile -> Attach Profiler..., where you select the Analyze Performance section:
Step 5: Only filter Bioclipse/CDK classes
Note in the above screenshot the "Bioclipse" filter set I have set up, with includes two global filters I defined by clicking the Edit Global Filters button:
IMPORTANT: make sure to click the "Inclusive" option, and not the "Exclusive" one. The latter will profile everything *except* the classes we are interested in.
Of course, you can filter any other set of classes.
Step 6: The output
The actual profiling is done by clicking the Attach button in the Select Profiling Task dialog of NetBeans, which will wait for the application to start. The latter is done in Eclipse using the normal Run mechanism, using the VM argument discussed earlier. TIP: It is useful to set up a separate Run profile in Eclipse for profiling with NetBeans.
Try the buttons in the Profiler tab on the left side of the NetBeans window. The output should then look a bit like this: