Intervals and State Machines
An Interval is used to measure or highlight the time between any two events that match the interval definition. By enabling or defining an Interval, you create a data set containing all sequences of events that match the definition. For instance, assuming a trace containing the user events On and Off, you can define an interval starting at On and ending at Off, and thereby see all On - Off sequences, independent of other events in between.
A State Machine is used to visualize any kind of state information logged in the trace. When defining a state machine, you specify the relevant events and how to extract the state information from these events. A simple example is, assuming a trace containing the user events On and Off, you can define a state machine MyFSM based on these events. Each occurrence of On and Off is then interpreted as the new state of MyFSM. A state machine contains multiple data sets, one for each state, where each data set contains all occurrences of its associated state. Tracealyzer also provides a predefined list of intervals and states for objects that Tracealyzer is aware of.
The Intervals and State Machines view (Views > Intervals and State Machines) allows for defining Intervals and State Machines, which allows for user-defined visualization of the recorded events in several views.
The view lists all Intervals and States Machines that have been activated. You can right-click an entry for the following options:
- Statistics - Shows a statistics report focusing on the durations.
- Show Timeline - Shows the states/intervals over time, much like a logic analyzer view.
- Show Plot - Plots the durations of the states/intervals.
- Create Inverted - Creates a new inverted data set. If the original data set is intervals from Event A to Event B, the inverted data set is the intervals from Event B to the next Event A.
- Compute Overlap - Creates a new data set that is the intersection of two data sets.
Intervals and States in the Vertical Trace
Intervals are shown in the vertical trace view by default, as soon as you create them. As shown on the left side of the above picture, the intervals appear as new columns, one for each interval or state, between the Actor columns and the event labels.
To add a predefined interval and state:
- Display the Intervals and State Machines view (Views > Intervals and State Machines).
- Click Add Predefined. The Predefined Intervals and States dialog appears.
- Choose a predefined state machine, and then click OK.
To add a custom state machine:
- Display the Intervals and State Machines view (Views > Intervals and State Machines).
- Click Add Custom State Machine. The New State Machine dialog appears.
You can create two types of state machines:
- Simple – Create a state machine by selecting a user event channel. This option assumes the state transitions are logged as user events, on a user event channel specific for this purpose. All messages on this user event channel are assumed to be state transitions. The machine will be named after the channel.
- Advanced – Create a state machine by defining a regular expression. Any labeled event can be matched, and a subset of the message can be interpreted as a state.
- Choose either Simple or Advanced, and then create the new state machine.
To add a custom interval:
- Display the Intervals and State Machines view (Views > Intervals and State Machines).
- Click Custom Intervals. The Custom Intervals dialog appears.
Specify a name for the interval, and then provide two rules for the beginning and end of the interval. The first interval will begin at the first event matching Interval Start, and finish at the first following event matching Interval End.
- Click Test to test the new interval. Click Save to save it.
Related Topics ABOUT TRACEALYZER:
- About Tracealyzer
- Terminology
- Understanding the Tracealyzer User Interface
- Configuring Tracealyzer
- Tips, Tricks, and Notes
rELATED tOPICS ABOUT MONITORING: