NetBeans IDE 6.0 contains a powerful profiling tool that provides important information about the run-time behavior of your application. The NetBeans profiling tool allows us to easily monitor the application's thread state, CPU performance, and memory usage in the IDE, with relatively low overhead.
This article outlines the profiling tools that are included in the IDE and guides you through the quick start of analyzing the performance of NetBeans projects. This article is intended to demonstrate the various profiling tasks available in the IDE and the analysis results that can be obtained when you analyze project performance. It does not cover all of the profiling features included in the IDE, nor does it delve into how to study profiling results to address specific execution issues that exist in your application.
In this document, we will use the Profiling Tools to obtain profiling data about the Anagram Game sample application, a simple Java application provided by the IDE. Although Anagram Game is a very simple Java application project, you still need to follow the same steps when you analyze larger, more complex Java applications and Web and enterprise application projects.
This document demonstrates how to use the IDE to analyze your application and obtain the following analysis results:
Run-time Behavior of the application
CPU time consumed by the application method
Object creation
In addition, this document will demonstrate how to create a snapshot of the analysis results and compare the results of the analysis.
Prerequisite conditions
This document assumes that you have the basic knowledge of the following technologies or have relevant programming experience:
Java programming
NetBeans IDE
The software required for this tutorial
To use this tutorial, you need to install the following software on your computer:
NetBeans IDE 6.0 (download).
Java Standard Development Kit (JDK) version 5.0 or 6.0 (download)
The NetBeans IDE binds this profiling tool so that you can start to analyze application performance without any special steps.
Initial analysis Performance
The first time you use the Profiling tool, the IDE needs to perform some initialization to ensure that accurate analysis results are available and that the tool and project are integrated. To show this, we will first create the Anagramgame project and then run the calibration. The first time you analyze the performance of a Anagramgame project, the IDE performs the integration automatically.