Profiling the application using the WAS
A process object, along with the associated agents is visible in the Profiling Monitor view of the Profiling and Logging perspective each time you profile a Java™ process. This workbench process object is a logical representation of a Java process rather than a system process. It is identified both by name and a process ID number (PID).
- Complete the task of setting up environment variables to profile a server.
- If the WebSphere® Application Server is remote, where the server is running on a different machine as the workbench, verify the application server is started. In addition, verify the IBM® Rational® Agent Controller is installed and started on the remote application server. In the case the application server is local, where the server is running on the same machine as the workbench, it is not necessary to start the local application server.
- When the workbench is started, verify the
Profiling and Logging capability is enabled. You can find the Profiling and Logging capability by selecting
Window | Preferences | Capabilities. The Capabilities preference page opens, select the
Advanced button. The Advanced Capabilities Settings dialog opens, expand the
Tester node and enable the
Profiling and Logging check box. Click OK in the Advanced Capabilities Settings dialog. Click OK in the Preference dialog.
Follow these steps to profile an application using the WAS:
- In the Enterprise Explorer view, right-click a resource that you want to profile on the server and select
Profile As | Profile on server. The Profile on Server wizard opens.
- Choose an existing server or manually define a new server. Click Next. The Add and Remove Project page opens.
- Under the
Configured Projects list, verify your application you want to profile is added. Click Finish.
- If the server is already started in run or debug mode, you will be prompt to switch to profile mode. Select the
Switch mode (will restart if necessary) radio button and click OK.
- Another Profile on Server wizard opens with Monitor and Destination tabs. Use this wizard to specify your profiling criteria, such as selecting the relevant data collectors, analysis types, filters, and configuring the profiling data destination. For more details, see the Specifying profiling criteria topic. Click Finish.
- If you have completed these steps from a Java EE, Debug or any other perspective other than the Profiling and Logging perspective; the Confirm Perspective Switch dialog opens, click
Yes to switch to the Profiling and Logging perspective.
- In the Servers view, the server state now displays Profiling.
- In the Profiling Monitor view, you can find the server process, process id and the corresponding profiler and analysis type. Here some tips on using the Profiling Monitor view:
For more details about the Profiling Monitor view, see Using the Profiling Monitor view topic.
- Double-click a profiler or analysis type, a corresponding view opens to the right-pane and displays any of the data collected. Alternatively, you can right-click on a profiler or analysis type, select
Open with, and select a particular view you want to open. For more information on the views, see Using profiling views to analyze data topic.
Tip: For the J2EE Request Profiler, double-click the profiler to open the UML2 Interactions view for visualizing the profiling data collected by the profiler. The
Open with context menu action on a J2EE Request Profiler displays a complete list of profiling views in which only the UML2 Interactions views are applicable to such profiler. Opening non-applicable views from the
Open with context menu can result in an error message indicating the view selected is not applicable to the J2EE Request Profiler. See the Displaying the data collected by the J2EE Request Profiler as sequence diagrams topic, for details on how to display the different interaction views for the J2EE Request Profiler.
- If there are additional data incoming or you want to populate the view with profiling data that was collected from your Java process, click the
Refresh Views button
, or select
Refresh Views from the context menu of the view.
- To synchronize the data collection with the opened views, click
Link with Viewer
on the toolbar.
Tip: There is a terminate button
available in the toolbar of the Profile Monitor view, that stops the agent or a running process. However, using this terminate button, issues a hard stop to the agent or process. Instead, you might want to stop the server from the Servers view to avoid missing the opportunity to issue any stop or shutdown scripts that might be scheduled to run on the server.
Related concepts