IBM BPM version 8570 cumulative fix 2017.06Accessing coach performance statistics

As you develop and test your coach-based user interfaces, you can access statistical data that helps you evaluate coaches and ensure an optimal user interface performance.

About this task

Statistics at design time
As you are building the coach views in your client-side or heritage human service in the web Process Designer, on-the-fly analysis is done on the coach and coach view configurations, and the results are displayed in the Static Analysis section of the coach layout palette.

By analyzing the statistics, you can evaluate the complexity of your user interface and make the necessary adjustments to ensure an optimal performance at run time. Based on coach content, the statistics can include information such as the number of coach views in a coach and the number of coach view instances that are created at run time for each item in the bound list. Where applicable, the coach views that have repeating elements are also listed. Hover over any entry in the list to display details about that coach view, which is also shown selected on the canvas.

These numbers are indicators that let you know when you venture outside of best practices, warning you of a potential performance decline.
Remember: Because not all coach views are equal, use the numbers as a guideline. For a better estimate of the performance impact, correlate the numbers with the complexity of the coach views. For example, 30 Date Time Picker coach views can have a heavier impact on performance than 100 Decimal or Integer coach views.
When you build large or complex coaches and coach views, the design-time WYSIWYG might also slow down the performance.
  • To disable the design-time WYSIWYG, in the Coaches tab, right-click anywhere on the canvas, then click Editor Options > Disable WYSIWYG in the Designer. When the WYSIWYG is turned off, the coaches on the canvas no longer respond to changes that you make to their configuration properties.
  • When you have completed the design of your coaches and want to turn the design-time WYSIWYG back on, right-click on the canvas and click Editor Options > Enable WYSIWYG in the Designer. Enabling the WYSIWYG persists between sessions.
Statistics at run time
When you run and test the coaches in your human service, you can also access statistical data that helps you evaluate the performance of each coach. The performance statistics provide information such as the number of coach view instances and types of coach views, and break down the total processing time according to coach view instance and lifecycle event handler. By analyzing the data for each coach, you can identify the segments that show delays. The performance monitor indicates the component that is responding slower. For example, if an activity in a client-side human service takes two seconds, and you see that there is a three-second delay between coaches, you might want to investigate the event between the coaches that is causing performance to slow down.

To access the performance statistics, you must first enable the runtime flag that displays the coach data, as described later in this topic. Then, as the human service runs, click Show Performance Statistics Show Performance Statistics in the upper-right corner of the coach window to display the Performance section for the first coach that completed running. Click Show Performance Statistics to display the statistics for each coach that completes running, or click Hide Performance Statistics Hide Performance Statistics to collapse the section.

Based on the structure and succession of coaches in your human service, the performance statistics include the following information:
Elapsed time
For the first coach that runs in a client-side human service, the section at the top shows the elapsed time of each activity since the human service started running. For the subsequent coaches, the top section shows the elapsed time of the activities that ran since the previous coach completed.
Note: The top section is not available if the coaches run in a heritage human service. Instead, only the coach layout information is displayed.
Coach layout information
The coach layout information is presented hierarchically: all the view instances first, view instances by coach view name next, and then individual view instances.
  • The total number of coach view instances
  • The view instances by coach view name
  • The total number of view types that are created
  • The time spent in each view instance
You can highlight individual view instances or multiple view instances by selecting the coach view name.
Call times
The call times represent the amounts of time spent inside the event handler functions, as defined in the coach views.
  • The total time spent in lifecycle event handlers
  • The time spent in event handlers for each type of coach view
  • The time spent in each lifecycle function
Note: Any JavaScript or processing code that runs asynchronously outside of the event handler functions is not included in the statistics.
Important: To update the statistics as data changes or segments of the coach are lazily loaded (in a Tab control, for example), click Refresh Refresh.

Procedure

To enable the runtime flag that displays the performance statistics, complete the following steps:

  1. In the web Process Designer, click Run to run your client-side human service or heritage human service.
  2. In the window that opens for your first coach, press F12 to start the web browser debugger or console.
  3. In the expression editor, enter the following line:
    localStorage["CoachPerformanceMonitor"] = true;
  4. Run the human service again.
  5. To disable the performance statistics flag, enter the following line in the expression editor:
    localStorage["CoachPerformanceMonitor"] = false;
    Tip: Alternatively, you can enable JavaScript debugging for coaches and coach views. See Enabling tracing for coaches.