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).

Follow these steps to profile an application using the WAS:

  1. 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.

  2. Choose an existing server or manually define a new server. Click Next. The Add and Remove Project page opens.

  3. Under the

    Configured Projects list, verify your application you want to profile is added. Click Finish.

  4. 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.

  5. 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.

  6. 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.

  7. In the Servers view, the server state now displays Profiling.

  8. 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:

    • 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.

    For more details about the Profiling Monitor view, see Using the Profiling Monitor view topic.

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

J2EE Request Profiler