Profiling the application using the WebSphere test environment

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 WebSphere test environment:
  1. Associate the project that you want to profile with a server and its configuration. For information on how to do this refer to the documentation for the WebSphere test environment.
  2. Ensure that the server is running.
  3. Click the list button (arrow to the right) of the Profile button Picture of Profile button (on the main toolbar), and from the menu list, select Attach  > Java Process.
    Note: You selected the local process; not Attach > Remote Process because the test environment is on your local machine.
    The Attach to Java Process wizard opens to the Agent page.
  4. Use this page to select the agents and their corresponding processes that you want to attach your Java process to. 
    Notes: 
  5. Click Next. The Destination page opens. 
  6. Specify the project and monitor that are to be used to store data from this profiling session.
  7. Click Next. The Profiling Filters page opens. Use it to specify new profiling filters, or modify the default profiling filters.
  8. Click Next. The Profiling Options page opens.
  9. Here, you can specify time and event profiling options, and whether you want the profiling data to include execution flow data, and data about the boundary classes; and if you want instance-level information to be collected. See the related task Specifying profiling preferences
  10. Click Finish.
  11. If you have completed these steps from any one of the Java, Server, or Debug perspectives, the Profiling and Logging perspective opens at this point.
  12. Since you are attaching to the agents, you must manually start monitoring the agents. Click the Start Monitoring button  from the Profiling Monitor view toolbar.  

    The agents that are monitored appear in the Profiling Monitor view with the Monitor symbol: Picture of agent in the monitored state.
  13. You can now analyze the collected data using the different profiling views.
  14. By default, the Profiling and Logging perspective first shows the Class Methods Statistics view when you double-click the selected agent.
  15. To populate the view with profiling data that was collected from your Java process, click the Refresh Views button Picture of Refresh Views button, or select Refresh Views from the context menu of the view. 

Tip: Instead of following the instructions in step 3, you can also select the host from which you want to launch the process, in the Profiling Monitor view, and from its pop-up menu, select Attach to Agents. The Attach to Java Process wizard opens to the Agents page.

Related concepts
Profiling resources

Related tasks
Setting profiling preferences
Specifying profiling filters
Saving profiling resources
Profiling an application in stand-alone mode

Related reference
Profiling Monitor view