Oracle Waveset 8.1.1 System Administrator's Guide

Working with the Waveset Profiler

Waveset provides a Profiler utility to help you troubleshoot performance problems with forms, Java, rules, workflows, and XPRESS in your deployment.

Customized forms, Java, rules, workflows, and XPRESS can cause performance and scale problems. The Profiler profiles how much time is spent in these different areas, enabling you to determine whether these forms, Java, rules, workflows, or XPRESS objects are contributing to performance and scale problems and, if so, which parts of these objects are causing the problems. You must use the Waveset IDE to view the profiled data.


Note –

When enabled, the Profiler has both a memory and a performance impact because this feature captures a significant amount of information across a wide range of services. If you are not having performance problems in your production system and you do not need the Profiler data, you can disable the Profiler as described in Disabling the Profiler.


This section explains how to use Waveset’s Profiler and provides a tutorial to help you learn how to troubleshoot performance issues in your deployment.

The information is organized into the following topics:


Note –

Waveset Profiler is only supported on version 7.1 Update 1 and later.


Overview

The section provides an overview of the Waveset’s Profiler’s features and functionality. The information is organized as follows:


Note –

The Profiler provides helpful information, but has a performance cost on its own. If you do not need the Profiler data, you can disable this utility using the instructions provided in .


Major Features

You can use the Profiler utility to

How the Profiler Locates and Manages Source

This section describes how the Profiler looks up and manages the source for the following Waveset objects:


Tip –

In Call Tree view or Hotspots view, you can double-click any node that corresponds to a Java method, workflow, form, rule, or XPRESS to view the source for that node.


Statistics Caveats

The following sections contain information to consider when you evaluate results provided by the Profiler:

Getting Started

This section describes how to start the Profiler and how to work with various features of the Profiler’s graphical user interface. This information is organized as follows:

Before You Begin

Because the Profiler is very memory intensive, you should significantly increase the memory for both your server and the Netbeans Java Virtual Machine (JVM).

    To increase your server’s memory,

  1. Open the Netbeans window and select the Runtime tab.

  2. Expand the Servers node, right-click Bundled Tomcat, and select Properties from the menu.

  3. When the Server Manager dialog displays, clear the Enable HTTP Monitor box on the Connection tab.

  4. Select the Platform tab, set VM Options to -Xmx1024M, and then click Close.

    To increase the Netbeans JVM memory,

  1. Open the netbeans-installation-dir \etc\netbeans.conff file and locate the following line:

    netbeans_default_options="-J-Xms32m -J-Xmx ...

  2. Change the -J-Xmx value to -J-Xmx 1024M.

  3. Save, and then close the file.

When you are finished, start the Profiler using the instructions provided in the Starting the Profiler section.

Starting the Profiler

You can use any of the following methods to start the Profiler from the Waveset IDE window:

When you start the Profiler, the Profiler Options dialog displays so you can specify which profiling options you want to use. Instructions for setting these options are provided in Specifying the Profiler Options.

Disabling the Profiler

To disable the Waveset Profiler, import the following configuration update:

lh import file

where file contains


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>

<Waveset>

<ImportCommand class='com.waveset.session.SystemConfigurationUpdater'>
<Object>
<Attribute name='serverSettings.default.disableProfiling'>
<Boolean>true</Boolean>
</Attribute>
</Object>
</ImportCommand>

</Waveset>

Using the Profiler

This section describes the features of the Profiler graphical user interface, and how to use these features. The information is organized as follows:

Specifying the Profiler Options

The Profiler Options dialog consists of the following tabs:

Use the options on these tabs to indicate which objects to profile and which elements to display in the profile.

After specifying the Profiler options, click OK to start the Profiler. Depending on your project configuration, the Profiler does one of two things:


Note –

You can select IdM -> Set Identity Manager Instance to control the Identity Manager Instance action for the project.


Working with the IDM Profiler View

The IDM Profiler view consists of the following areas:

Working with the Snapshot View

When you open a snapshot, the results display in the Snapshot View window, located on the upper right side of Waveset IDE.

A snapshot provides the following views of your data:

Using the Pop-Up Menu Options

Right-click any node in Call Tree view or in Hotspots view and a pop-up menu displays with the options described the following table:

Menu Options 

Description 

GoTo Source 

Select this option to view the XML source for a node that corresponds to a Java method, workflow, form, rule, or XPRESS. For detailed information about this view, see How the Profiler Locates and Manages Source.

Show Back Traces 

Select this option to access the Back Traces view. For detailed information about this view, see Working with the Snapshot View.

Show Callees 

Select this option to access the Callees view. For detailed information about this view, see Working with the Snapshot View.

Find In Hotspots 

Select this option to find a node in the Hotspots view. For detailed information about this view, see Working with the Snapshot View.

List Options -> Sort -> 

Select this option to 

  • None

  • Call Tree

  • Time

  • Invocations

  • Ascending

  • Descending

List Options -> Change Visible Columns 

Select this option to change the columns displayed in the Call Tree or Hotspots list. 

When the Change Visible Columns dialog displays, you can select one or more of the following options: 

  • Call Tree: Call Tree

  • Invocations: Invocations

  • Time: Time

Searching a Snapshot

Use the Search iconSearch icon , located at the top of the Snapshot View window to search for nodes by name the Call Tree view or Hotspots tree.

Alternatively, right-click any node in Call Tree view or Hotspots view and select Find in Call Tree or Find in Hotspots (respectively) from the pop-up menu to search for a node.

Saving a Snapshot

The Profiler provides several options for saving a snapshot. See the following table for a description of these options:

Icon 

Name 

Purpose 

Start Identity Manager Profiler icon

Save the Snapshot in the Project icon (located at the top of the Snapshot View window) 

Saves the snapshot in the nbproject/private/idm-profiler directory of your project. Snapshots saved in your project are listed in the Saved Snapshots section of the Profiler view.

Stop Identity Manager Profiler icon

Save the Snapshot Externally icon (located at the top of the Snapshot View window) 

Saves a snapshot to an external, arbitrary location. 

Reset Collected Results icon

Save As button (located in the Saved Snapshots area) 

Saves a snapshot to an external, arbitrary location. 

Tutorial: Troubleshooting Performance Problems

Waveset provides a tutorial (profiler-tutorial.zip) to help you learn how to use the Profiler to troubleshoot forms, Java rules, workflows, and XPRESS.

Use the following steps to complete the tutorial.

ProcedureStep 1: Create an Waveset Project

  1. Select File -> New Project.

  2. When the New Project wizard displays, specify the following, and then click Next:

    1. In the Categories list, select Web to indicate what type of project you are creating.

    2. In the Projects list, select Waveset Project.


      Note –

      You must create a regular Waveset project for a fully featured development environment. Do not select the Waveset Project (Remote) option.


  3. Complete the following fields on the Name and Location panel, and then click Next:

    • Project Name: Enter Idm80 as the project name.

    • Project Location: Use the default location or specify a different location.

    • Project Folder: Use the default folder or specify a different folder.

  4. When the Waveset WAR File Location panel displays, enter the location of the Waveset 8.1.1 war file. Typically, unzipping this file creates an idm.war file in the same directory.

  5. Click Next to continue to the Repository Setup panel.

    You should not have to change the default settings on this panel, just click Finish. When you see the BUILD SUCCESSFUL message in the Waveset IDE Output window, you can extract the Profiler tutorial files. See Step 2: Unzip the Profiler Tutorial for instructions.

ProcedureStep 2: Unzip the Profiler Tutorial

  1. Unzip profiler-tutorial.zip in the project root. The extracted files include:

    <project root>/custom/WEB-INF/config/ProfilerTutorial1.xml
    <project root>/custom/WEB-INF/config/ProfilerTutorial2.xml
    <project root>/src/org/example/ProfilerTutorialExample.java
    <project root>/PROFILER_TUTORIAL_README.txt
  2. Start the Profiler. Proceed to Step 3: Start the Profiler.

ProcedureStep 3: Start the Profiler

  1. Use the instructions provided in Before You Begin to increase the memory for your server and Netbeans JVM.

  2. Use any of the methods described in Starting the Profiler to start the Profiler.

  3. When the Profiler Options dialog displays, you can specify profiling options.

  4. Continue to Step 4: Set the Profiler Options


    Note –

    For detailed information about all of the different Profiler options, see Specifying the Profiler Options.


ProcedureStep 4: Set the Profiler Options

For the purposes of this tutorial, specify the following Profiler options:

  1. On the Mode tab, select Java and IDM Objects to profile form, Java, rule, workflow, and XPRESS objects.

  2. Select the Java Filters tab.

    Use the following steps to disable all Waveset Java classes except your custom Java classes (in this case, org.example.ProfilerTutorialExample):

    1. Click New and a new, blank field appears at the bottom of the Filter column.

    2. Enter com.waveset.* into the new field, and then select the Exclude box.

    3. Click New again.

    4. Enter com.sun.idm.* into the new field, and then select the Exclude box.

  3. Click OK to run the Profiler.


    Note –

    The Profiler takes a few minutes to complete the first time you run it on a project or if you have recently performed a Clean Project action.


    When the Profiler finishes processing, you are prompted to Log In.

  4. Enter the password configurator, select the Remember Password box, and then click OK to continue.

  5. When the Waveset window displays, log in.


    Note –

    Typically, you should log in to Waveset as a different user instead of logging in as configurator again. You are already logged into the Profiler as configurator, and the Waveset session pool only allows one entry per user. Using multiple entries can result in the appearance of a broken session pool and might skew your profiling results for finer-grained performance problems.

    However, for this simple example the session pool is of no consequence so you can login as configurator/configurator.


  6. In Waveset, select Server Tasks -> Run Tasks, and then click ProfilerTutorialWorkflow1.

    The tutorial might take a few moments to respond.

  7. Although you could take a snapshot now; you are going to reset your results instead, run the Profiler, run it again, and then take a snapshot.


    Note –

    It is a best practice to run the Profiler a couple of times before taking a snapshot to be sure all the caches are primed, all the JSPs are compiled, and so forth.

    Running the Profiler several times enables you to focus on actual performance problems. The only exception to this practice is if you are having a problem populating the caches themselves.


    1. Return to the IDM Profiler view in the Waveset IDE. Click the Reset Collected Results icon in the Profiling Results section (or in the Controls section) to reset all of the results collected so far.

    2. In Waveset, select Server Tasks -> Run Tasks again, and click ProfilerTutorialWorkflow1.

    3. When the Process Diagram displays, return to the Waveset IDE and click Take Snapshot in the Profiling Results section.

  8. The Waveset IDE downloads your snapshot and displays the results on the right side of the window.

    This area is the Call Tree view. At the top of the Call Tree, you should see a /idm/task/taskLaunch.jsp with a time listed in the Time column. The time should indicate that the entire request took six+ seconds.

  9. Expand the /idm/task/taskLaunch.jsp node, and you can see that ProfilerTutorialWorkflow1 took six seconds.

  10. Expand the ProfilerTutorialWorkflow1 node. Note that activity2 took four seconds and activity1 took two seconds.

  11. Expand activity2.

    Note that action1 took two seconds and action2 took two seconds.

  12. Expand action1 and note that the <invoke> also took two seconds.

  13. Double-click the <invoke> to open ProfilerTutorialWorkflow1.xml and highlight the following line:


    <invoke name=’example’ class=’org.example.ProfilerTutorialExample’/>

    You should see that a call to the ProfilerTutorialExample method took two seconds.


    Note –

    You are actually browsing XML source that was captured in the snapshot, rather than source in the project. Snapshots are completely self-contained. (For more information, see How the Profiler Locates and Manages Source.)


  14. Select the CPU:<date><time> tab to return to your snapshot.

  15. Expand the <invoke> node, and note that the Profiler spent two seconds in the Java ProfilerTutorialExample.example() method.

  16. Double-click the method name to open the ProfilerTutorialExample.java source and highlight the following line:


    Thread.sleep(2000);

    There’s the problem! This method contains a two-second thread sleep.

  17. If you return to the Call Tree, you can see that all of the two second paths lead to this method. (You should see three paths; for a total of six seconds.)

  18. Select the Hotspots tab (located at the bottom of the Call Tree area) to open the Hotspots view. Notice that ProfilerTutorialExample.example() has a total self time of six seconds.

    (For more information about Hotspots, see Working with the Snapshot View.)

  19. Right-click ProfilerTutorialExample.example() and select Show Back Traces from the pop-up menu.

    A new Back Traces tab displays at the bottom of the area.

  20. Expand the ProfilerTutorialExample.example() node on the Back Traces tab to see that this method was called from three places, and that the method took two seconds when it was called from each place.

    (For more information about Back Traces, see Working with the Snapshot View.)

  21. Click the Save the snapshot in the project icon to save your snapshot and close it.

    If you check the Saved Snapshots section on the IDM Profiler tab, you should see your snapshot. (You might have to scroll down.)

  22. Select the saved snapshot, and then click Open to re-open it.


    Note –

    You can use the Save As button to save your snapshots externally and use the Load button to load a snapshot from outside your project.


  23. Close the snapshot again.

ProcedureStep 5: Profile a ManualAction Workflow

The next part of this tutorial illustrates how to profile a workflow ManualAction.

  1. In Waveset, select Server Tasks -> Run Tasks, and then click ProfilerTutorialWorkflow2.

    After a few moments, an empty form displays.

  2. Click Save and the process diagram displays.

  3. Select Server Tasks -> Run Tasks again.

  4. Return to the Waveset IDE IDM Profiler view and click the Reset Collected Results icon in the Profiling Results section.

  5. Now click ProfilerTutorialWorkflow2 in Waveset.

  6. When the blank form displays again, click Save.

  7. In the IDM Profiler view, click Take Snapshot.

    After a few seconds, a snapshot should display in the Call Tree area. You should see that /idm/task/workItemEdit.jsp took six+ seconds. (This result corresponds to the manual action in the workflow.)

  8. Expand the /idm/task/workItemEdit.jsp node and note that running all Derivations in the ManualAction form took a total of six seconds.

  9. Expand the Derivation, displayNameForm, variables.dummy, and <block> nodes.

    You should see that the <block> took six seconds and, of that time, the Profiler spent two seconds in each of the three invokes to the ProfilerTutorialExample.example(). method.

  10. You can double-click <block> to view the source.