Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.tools.traceAnalysis.systemModel
Class ExecutionTrace

    java.lang.Object
      kieker.tools.traceAnalysis.systemModel.AbstractTrace
          kieker.tools.traceAnalysis.systemModel.ExecutionTrace

    public class ExecutionTrace

extends AbstractTrace

This class is a container for a whole trace of executions (represented as instances of `Execution`). Note that no assumptions about the `TimeUnit` used for the timestamps are made.

Since:
  0.95a
Author:
  Andre van Hoorn

Field Summary

Fields inherited from class kieker.tools.traceAnalysis.systemModel.AbstractTrace
`DEFAULT_SESSION_ID, NO_TRACE_ID`

Constructor Summary
`ExecutionTrace(long traceId)` Creates a new instance of this class using the given parameters.
`ExecutionTrace(long traceId, String sessionId)` Creates a new instance of this class using the given parameters.

Method Summary
`void` | `add(Execution execution)` Adds an execution to the trace.
`static Comparator<Execution>` | `createExecutionTraceComparator()` Returns an instance of the `Comparator` used by the internal `TreeSet` to compare `Execution`s.
`boolean` | `equals(Object obj)` Returns whether this Execution Trace and the passed Object are equal.
`long` | `getDuration()` Returns the duration of this (possibly incomplete) trace.
`long` | `getEndTimestamp()` Returns this trace's end timestamp.
`int` | `getLength()` Returns the length of this trace in terms of the number of contained executions.
`int` | `getMaxEoi()` Returns the maximum execution order index (eoi) value within the trace.
`int` | `getMaxEss()` Returns the maximum execution stack size (ess) value, i.e., the maximum stack depth, within the trace.
`long` | `getMaxTout()` Returns the maximum timestamp value of an execution return in this trace.
`int` | `getMinEoi()` Returns the minimum execution order index (eoi) value within the trace.
`long` | `getMinTin()` Returns the minimum timestamp of an execution start in this trace.
`long` | `getStartTimestamp()` Returns this trace's start timestamp.
`SortedSet<Execution>` | `getTraceAsSortedExecutionSet()` Returns a sorted set (unmodifiable) of `Execution`s in this trace.
`int` | `hashCode()`
`MessageTrace` | `toMessageTrace(Execution rootExecution)` Returns the message trace representation for this trace. The transformation to a message trace is only computed during the first execution of this method.
`String` | `toString()`

Methods inherited from class kieker.tools.traceAnalysis.systemModel.AbstractTrace
`getSessionId, getTraceId, getTraceInformation`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ExecutionTrace

    public ExecutionTrace(long traceId)

  Creates a new instance of this class using the given parameters.

  Parameters:
    `traceId` - The ID of this trace.

### ExecutionTrace

    public ExecutionTrace(long traceId,
                          String sessionId)

  Creates a new instance of this class using the given parameters.

  Parameters:
    `traceId` - The ID of this trace.
    `sessionId` - The ID of the current session.

Method Detail

### add

    public void add(Execution execution)
             throws InvalidTraceException

  Adds an execution to the trace.

  Parameters:
    `execution` - The execution object which will be added to this trace.
  Throws:
    `InvalidTraceException` - If the traceId of the passed Execution object is not the same as the traceId of this ExecutionTrace object.

### toMessageTrace

    public MessageTrace toMessageTrace(Execution rootExecution)
                                throws InvalidTraceException

  Returns the message trace representation for this trace.
  The transformation to a message trace is only computed during the first execution of this method. After this, the stored reference is returned --- unless executions are added to the trace afterwards.

  Parameters:
    `rootExecution` - The root execution object.
  Returns:
    The resulting message trace.
  Throws:
    `InvalidTraceException` - If the given execution is somehow inconsistent or invalid.

### getTraceAsSortedExecutionSet

    public final SortedSet<Execution> getTraceAsSortedExecutionSet()

  Returns a sorted set (unmodifiable) of `Execution`s in this trace. Note that the returned data structure is the (wrapped )internal data structure of this `ExecutionTrace` object, to which further elements may be added by the `add(Execution)` method. Consider to create a copy of the returned list, while synchronizing on this (i.e., the `ExecutionTrace`) object.

  Returns:
    the sorted set of `Execution`s in this trace

### getLength

    public final int getLength()

  Returns the length of this trace in terms of the number of contained executions.

  Returns:
    the length of this trace.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getMaxEss

    public int getMaxEss()

  Returns the maximum execution stack size (ess) value, i.e., the maximum stack depth, within the trace.

  Returns:
    the maximum ess; -1 if the trace contains no executions.

### getMaxEoi

    public int getMaxEoi()

  Returns the maximum execution order index (eoi) value within the trace.

  Returns:
    the maximum eoi; -1 if the trace contains no executions.

### getMinEoi

    public int getMinEoi()

  Returns the minimum execution order index (eoi) value within the trace.

  Returns:
    the minimum eoi; -1 if the trace contains no executions.

### getDuration

    public long getDuration()

  Returns the duration of this (possibly incomplete) trace. This value is the difference between the maximum tout and the minimum tin value. Note that no specific assumptions about the `TimeUnit` are made.

  Returns:
    the duration of this trace.

### getMaxTout

    public long getMaxTout()

  Returns the maximum timestamp value of an execution return in this trace. Notice that you should need use this value to reason about the control flow --- particularly in distributed scenarios.

  Returns:
    the maxmum timestamp value; -1 if the trace contains no executions.

### getMinTin

    public long getMinTin()

  Returns the minimum timestamp of an execution start in this trace. Notice that you should need use this value to reason about the control flow --- particularly in distributed scenarios.

  Returns:
    the minimum timestamp value; -1 if the trace contains no executions.

### getStartTimestamp

    public long getStartTimestamp()

  Description copied from class: `AbstractTrace`
  Returns this trace's start timestamp.

  Specified by:
    `getStartTimestamp` in class `AbstractTrace`
  Returns:
    See above

### getEndTimestamp

    public long getEndTimestamp()

  Description copied from class: `AbstractTrace`
  Returns this trace's end timestamp.

  Specified by:
    `getEndTimestamp` in class `AbstractTrace`
  Returns:
    See above

### hashCode

    public int hashCode()

  Description copied from class: `AbstractTrace`

  Overrides:
    `hashCode` in class `AbstractTrace`

### equals

    public boolean equals(Object obj)

  Returns whether this Execution Trace and the passed Object are equal. Two execution traces are equal if the set of contained executions is equal.

  Specified by:
    `equals` in class `AbstractTrace`
  Parameters:
    `obj` - The object to be compared for equality with this.
  Returns:
    true if and only if the two objects are equal.

### createExecutionTraceComparator

    public static final Comparator<Execution> createExecutionTraceComparator()

  Returns an instance of the `Comparator` used by the internal `TreeSet` to compare `Execution`s.

  Returns:
    A comparator instance to compare execution objects.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2014 Kieker Project, http://kieker-monitoring.net