UML2 Trace Interaction views

The UML2 Trace Interaction views present execution flow of an application according to the notation defined by UML. It is a useful view when used with either the Log and Trace Analyzer or the Profiling Tool.

The UML2 Trace Interaction views are available only if the collection of execution flow information has been enabled.

The UML2 Trace Interaction view presents a sequence of causal dependent events, where events are defined as method entries and exits as well as outbound calls and return calls.  Specifically, it presents interactions between class instances. Those interactions have the form of method calls and call returns. The implementation of the Trace Interaction tool does extend that definition to one which generalizes actors of interactions as well as their means. In other words, the views provided by the tool are able to present not only the interactions of classes and class instances, but also those among threads, processes, and hosts. This extended use of the execution flow notation is motivated by the need to provide a hierarchy of data representation, which is necessary for large-scale, distributed traces.

Execution data displayed in the sequence diagram view is acquired from an instance of a Java Profiling Agent.  The Java Profiling Agent supplies data which enables the tool to generate the execution flow of a Java application that runs in a specific Java Virtual Machine (JVM) to which the agent is attached.

Display

Here is an example of a Trace Interaction display:

class interactions sequence diagram sample

Time Compression Bar and Scale

The time compression bar along the left edge of the diagram indicates the time elapsed between consecutive events. The time compression scale shows where the time falls between the minimum and maximum delta times. The intensity of the color is used to indicate the length of time, namely, the deeper the intensity, the higher the delta time.

Screen capture of part of the Trace Interaction view

The time compression bar and scale may provide accurate indication as to which part of a method consumes the most time. It may be located between two calls, at a call and method entry or exit, or it may cover a whole method.

Data acquisition hierarchy

You can view the sequence of execution flow from different levels of abstraction, starting with class interactions, through interactions among threads, or process interactions, up to hosts interactions across a network. The importance of this multilevel data presentation becomes obvious for the monitoring of e-business applications.

Depending on the application infrastructure, you may need to view the execution flow on different levels of the monitoring hierarchy. For a local application, the level of process or host may be adequate, but for a distributed application, the monitor level, which provides a view of the execution across multiple hosts, could be more appropriate. Viewing the execution of a distributed application from the monitor level may reveal some points of interest which can  direct application developers to any of the lower level graphs to perform more detailed viewing or analysis. For example, in the case of an application consisting of servlets and enterprise beans that are distributed across a cluster of hosts, the preliminary view of the host interactions may lead a software developer to view sequence diagrams of object interactions for specific processes. These diagrams will show only selected data, representing part of the execution within an enterprise bean or servlet container, on the level of corresponding business components.

To navigate the data acquisition hierarchy, you can use the Profiling Monitor view.  Each of the hierarchy levels of the profiling resources provides all the applicable types of sequence diagrams. The following types of diagrams are available:

Printing UML2 Trace Interaction views

The UML2 Trace Interaction view includes a dedicated print dialog with tiling and zoom features. The print dialog allows you to manage UML2 Trace Interaction diagrams which can grow large in size.

The UML2 interaction view print dialog, showing the Number of horizontal pages and Selected pages options.

The UML2 Trace Interaction view print dialog appears when you choose File > Print... from the File menu. The following table summarizes the various print options.

Option Description
Zoom options Use current zoom: The current UML2 Trace Interactions view determines the scaling factor. In particular, the horizontal distance in the active view maps to a the width of a printed page.

Number of horizontal pages: The number of horizontal pages which span the UML2 Trace Interactions diagram area determines the scaling factor.

Number of vertical pages: The number of vertical pages which span the UML2 Trace Interactions diagram area determines the scaling factor.

Total number of pages: Based on the selected scaling factor, this is the total number of pages the UML2 Trace Interactions diagram occupies.
Print range All pages: Print the entire UML2 Trace Interactions diagram. The number of pages is determined by the Total number of pages field.

Current view: Print the current view on a single page. This option can only be used in conjunction with the Use current zoom option.

Selected pages: Print the pages selected in the Preview frame. In this case, the number of pages is determined by the number of pages in the selection.

Pages From/To: Print the selected range. Page numbering of tiles occurs left to right, top to bottom. The Preview frame displays the page number of a selected tile.
Preview Displays the print area as a series of tiles based on scaling and print range options. You can use the Preview frame's horizontal and vertical scroll bars to span the entire UML2 Trace Interactions diagram. Tiles are numbered from left to right, and top to bottom. The Preview frame indicates the page number of a selected tile.

If you choose the Selected pages print range option, the Preview frame is active. To select a range of tiles, hold down the Shift key and click on the tile defining the range. To add individual tiles to the selection, hold down the Ctrl key and click on a required tile.


Related concepts
Overview of the Profiling Tool
Determining problems in applications

Related tasks
Profiling an application
Viewing trace interactions
Using UML2 Trace Interaction views

Related reference
Time