Kieker 1.5

kieker.tools.traceAnalysis.systemModel
Class ExecutionTrace

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

public class ExecutionTrace
extends AbstractTrace

Author:
Andre van Hoorn

Field Summary
 
Fields inherited from class kieker.tools.traceAnalysis.systemModel.AbstractTrace
NO_TRACE_ID
 
Constructor Summary
ExecutionTrace(long traceId)
           
ExecutionTrace(long traceId, String sessionId)
           
 
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 Executions.
 boolean equals(Object obj)
          Returns whether this Execution Trace and the passed Object are equal.
 long getDurationInNanos()
          Returns the duration of this (possible incomplete) trace in nanoseconds.
 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.
 SortedSet<Execution> getTraceAsSortedExecutionSet()
          Returns a sorted set (unmodifiable) of Executions in this trace.
 int hashCode()
           
 MessageTrace toMessageTrace(Execution rootExecution)
          Returns the message trace representation for this trace.
 String toString()
           
 
Methods inherited from class kieker.tools.traceAnalysis.systemModel.AbstractTrace
getSessionId, getTraceId
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutionTrace

public ExecutionTrace(long traceId)

ExecutionTrace

public ExecutionTrace(long traceId,
                      String sessionId)
Method Detail

add

public void add(Execution execution)
         throws InvalidTraceException
Adds an execution to the trace.

Parameters:
execution -
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.

Throws:
InvalidTraceException

getTraceAsSortedExecutionSet

public final SortedSet<Execution> getTraceAsSortedExecutionSet()
Returns a sorted set (unmodifiable) of Executions in this trace.

Returns:
the sorted set of Executions 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.

getDurationInNanos

public long getDurationInNanos()
Returns the duration of this (possible incomplete) trace in nanoseconds. This value is the difference between the maximum tout and the minimum tin value.

Returns:
the duration of this trace in nanoseconds.

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.

hashCode

public int hashCode()
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 -
Returns:
true 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 Executions.


Kieker 1.5

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