When analyzing application performance, you can create a custom configuration and set more advanced profiling options.
You set the advanced options by clicking Advanced Settings in the configuration pane for your custom configuration.
Click Basic Settings to set the configuration options in the Basic Options pane.
The options that are available in the Advanced Settings pane depend upon the
the options that you select in the Basic Settings pane.
If you choose the Quick option in the Basic Settings pane you will see fewer options in the
Advanced Settings pane.
Settings for Quick (Sampled) Option
If you select the Quick (Sampled) option in the Basic Settings pane you can
set the following options in the Advanced Settings pane:
Settings
Sampling Frequency. Specify how often the the application is sampled.
Threads
Enable Threads Monitoring. When selected, application threads are monitored from application startup.
When deselected (default), thread monitoring does not begin until you click the Threads button in the Threads window.
Sample Threads States. When selected, thread states are updated periodically.
This option is selected by default.
Settings for Advanced (Instrumented) Option
If you select the Advanced (Instrumented) option in the Basic Settings pane you can
set the following options in the Advanced Settings pane:
Settings
Methods Tracking.
When tracking methods, a "method entry" call is injected at the beginning of each profiled method,
and a "method exit" call before each return.
You can choose the granularity of tracking by selecting one of the following options:
Exact Call Tree and Timing.
When selected, the time spent in the method is calculated as the difference between the timestamp
that is generated for each "method entry" and corresponding "method exit".
Exact Call Tree, Sampled Timing.
When selected, you must specify a sampling interval.
The time spent in the method is calculated as the difference between the timestamp that is generated
for the "method entry" and corresponding "method exit" that fall approximately at the end of each sampling interval.
For more about which option to choose, see the following NetBeans FAQ:
Exclude time spent in Thread.sleep() and Object.wait(). When selected, these methods are not profiled.
Profile underlying framework setup.When selected, startup of the application's target JVM
is also profiled.
Profile new Threads/Runnables. When selected, instruments the code for
any thread or runnable started after the application enters the root instrumentation method.
This is selected by default when profiling the entire application.
Limit number of profile threads. When selected, every time a thread that has not been previously
registered enters the instrumented code, this counter is decremented. When
it reaches zero, registration of new threads is stopped. Profiling data
is collected only for the registered threads.
To reset the counter to this value, choose Profile > Reset Collected Results from the
the main menu.
For more about when to use these option, see the following NetBeans FAQ:
Use thread CPU timer (Solaris only).
For more about using timers, see the following NetBeans FAQ:
Instrumentation Scheme. Select an instrumentation scheme
to limit the number of instrumented methods. (Usually, it is best if
the number of instrumented methods and the number of methods actually called
by the application when it is profiled are the same or very close.)
Total - This scheme is more appropriate if you want to profile application startup, or an
entire application such as a short-running command line utility
This scheme is selected by default when profiling the entire application.
"Lazy" - This scheme is usually the most appropriate when you
want to profile a subset of the application code (for example, just one
or more servlets running on top of an application server). Results in
the smallest number of methods being instrumented.
This scheme is selected by default when profiling part of an application.
Eager - This scheme is not recommended for long-running applications.
Eager instrumentation is a compromise between the Total and Lazy schemes.
For more about instrumentation schemes, see the following NetBeans FAQ:
Instrument: Method.invoke(), Getter/setter methods, empty methods.
By default these types of methods are not instrumented.
For more about instrumenting these methods, see the following NetBeans FAQ:
Threads
Enable Threads Monitoring. When selected, application threads are monitored from application startup.
When deselected (default), thread monitoring does not begin until you click the Threads button in the Threads window.
Sample Threads States. When selected, thread states are updated periodically.