UML2 Sequence Diagrams

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

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

The UML2 Sequence Diagram 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 Sequence Diagram 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 Sequence Diagram 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 Sequence Diagram 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:

 

Related concepts
Overview of the Profiling Tool
Overview of the Log Analyzer
 

Related tasks
Profiling an application
Viewing trace interactions

Related reference
Sequence Diagram controls
Lifeline categories
Monitoring levels and corresponding views
Time