Getting started: Performance bottleneck detection
Performance bottlenecks are places in your application that prevent the application from running as fast as it should. The Profiling and Logging perspective includes views for examining performance and detecting bottlenecks.
The following views are available for performance bottleneck detection:
- The Performance Call Graph and Method Details views.
- The Package Statistics, Class Statistics, and Method Statistics views.
- The Method Invocation, Method Invocation Table, Execution Flow, Execution Flow Table, and the UML2 Sequence Diagram views.
Parent topic
Getting started with run-time problem determination
Collecting data for performance bottleneck detection
Prerequisites:
- Agent Controller must be running on the machine on which you are collecting data. For information, refer to the installation guide.
- Create a profiling configuration. Read Getting started: Creating a profiling configuration for run-time problem determination.
To collect data:
- In the Profiling tab of the Profile dialog box, select the Execution History - Full Performance Call Graph profiling set.
- Click Profile to start your application.
- Use your application, exercising the routine you want to investigate for performance bottlenecks. Performance data is collected and recorded in an Execution Time Analysis profiling resource, which is displayed in the Profiling Navigator. You can now terminate your application.
Use the Performance Call Graph and Method Details views to detect performance bottlenecks
Both the Performance Call Graph view and the Method Details view display all the timed performance data for the run. The Performance Call Graph view presents a global view of the data for the entire run, while the Method Details view displays the data method by method.
To detect performance bottlenecks:
- Display the Performance Call Graph view: Right-click the Execution Time Analysis profiling resource for the performance data that you collected, and from the pop-up menu select Open With > Performance Call Graph. Notice the following:
- The graph initially displays as nodes the 20 methods that are responsible for consuming the largest amount of time.
- The lines between the nodes represent call paths. Thicker lines are used for more expensive call paths.
- You can focus the call graph by right-clicking a node and choosing a command from the pop-up menu.
- Identify a method that you suspect of consuming more time than it should.
- Double-click the method to open the Method Details view.
- Use the Performance Call Graph and the Method Details view together to investigate the entire data set. The two views are synchronized whenever you select a new method.
- To examine the source code for a method, right-click it in either of these views and select Open Source from the pop-up menu.
For more information, read Detecting performance bottlenecks.
Use the Method Statistics, Class Statistics, and Package Statistics views
These views allow you to examine performance statistics in tables that you can sort to isolate the worst-performing methods, classes, and packages. These tables are limited to displaying statistics for time spent in individual methods, classes, and packages; they have no information about calls or calling relationships.
To use these views:
- To display the view, selectWindow > Show View > Other . . .; expand the Profiling and Logging entry in the Show View dialog box, and select the name of the view.
- Use the these windows to help you focus the Performance Call Graph and Method Details view on potential bottlenecks.
Use the Method Invocation, Execution Flow, and UML2 Sequence Diagram views
These views allow you to distinguish different ways the same method is invoked. You can display method invocation data and execution flow data either in graphical or tabular format.
To use these views:
- To display the Method Invocation or Method Invocation Table view, select Window > Show View > Other . . .; expand the Profiling and Logging entry in the Show View dialog box, and select Method Invocation (for a graphical representation) or Method Invocation Table.
- To examine the data on which the Method Invocation views are based, select Window > Show View > Other . . ., and select Execution Flow (for a graphical representation) or Execution Flow Table. These views contain the same data as the Method Invocation views, but allow you to examine the order of execution.
- To examine the same data in UML2 sequence diagram format, right-click the Execution Time Analysis profiling resource for the performance data that you collected, and from the pop-up menu select Open With, followed by the UML2 view for the type of interactions you want to analyze.