Monitoring an Application


The Monitor Application task is useful for watching high-level statistics as your application runs. The Monitor Application task does not do any instrumentation and therefore imposes no profiling overhead. To choose it, click Monitor Application (shown in Figure 15-4).

Figure 15-4. Monitor Application options


The Monitor Application task will display basic information about your application: heap memory allocated, heap memory in use, percentage of time spent doing garbage collection, and number of threads that are running. These values are displayed in both the Profiler Control Panel and in the VM Telemetry Overview window (shown in Figure 15-5).

Figure 15-5. VM Telemetry Overview window


The VM Telemetry Overview window also displays the surviving generations on the heap. For an explanation of surviving generations, refer to the Surviving Generations and Memory Leaks section later in this chapter.

By default, detailed information about the state of each thread is also monitored. It is displayed in the Threads window (shown in Figure 15-6).

Figure 15-6. Threads window


The thread states are shown with color coding:

  • Green. Thread is either running or is ready to run.

  • Purple. Thread is sleeping in Thread.sleep()

  • Yellow. Thread is waiting in a call to Object.wait()

  • Red. The thread is blocked while trying to enter a synchronized method or block

The scroll bar can be used to scroll through time, allowing you to examine thread state going all the way back to when your application started. Click the Zoom In and Zoom Out icons () to control the level of detail displayed by the Threads window.

Double-clicking a thread will switch the Threads window to its Details tab, where more information about the selected thread is displayed (shown in Figure 15-7).

Figure 15-7. Thread Details




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net