de.uka.ipd.sdq.ByCounter.execution
Class CountingResultIndexing

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.execution.CountingResultIndexing

public class CountingResultIndexing
extends java.lang.Object

Indexing infrastructure for CountingResults.

Author:
Martin Krogmann, Michael Kuperberg

Constructor Summary
CountingResultIndexing()
           
 
Method Summary
 void add(CountingResult res, long reportingStart)
          Add to indexing infrastructure.
 void clearResults()
           
 java.util.HashMap<CountingArtefactInformation,CountingResult> getAllCountingResultsByArtefacts()
          Gets the mapping of CountingArtefactInformation to CountingResults.
 java.util.HashMap<java.lang.Long,CountingArtefactInformation> getCountingArtefactsByBeginning()
          Gets the CountingArtefactInformation by the time of method execution beginning.
 java.util.HashMap<java.lang.String,java.util.List<CountingArtefactInformation>> getCountingArtefactsByMethodname()
          Gets the CountingArtefactInformation by method name.
 java.util.List<CountingArtefactInformation> getCountingArtefactsByName(java.lang.String name)
          Gets the CountingArtefactInformation by method name.
 CountingArtefactInformation getCountingArtefactsByTime(long time)
          Gets the CountingArtefactInformation by the time of method execution beginning.
 CountingArtefactInformation getCountingArtefactsByTimestamp(java.sql.Timestamp timestamp)
          Gets the CountingArtefactInformation by the time of method execution beginning.
 CountingResult getCountingResultByMethodStartTimestamp(java.sql.Timestamp timestamp)
          Gets the CountingArtefactInformation by the time of method execution beginning.
 CountingResult retrieveCountingResultByMethodStartTime(long time)
          Gets the CountingArtefactInformation by the time of method execution beginning.
 CountingResult retrieveCountingResultByStartTime_evaluateCallingTree(long callerStartTime, boolean suppressDebugMessages)
          Gets a CountingResult that is the accumulation of all reported results of the calling tree specified by the callerStartTime.
 java.util.SortedSet<CountingResult> retrieveCountingResultsByMethodName(java.lang.String name)
          Gets the CountingResults that exist for the given method name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingResultIndexing

public CountingResultIndexing()
Method Detail

clearResults

public void clearResults()

add

public void add(CountingResult res,
                long reportingStart)
Add to indexing infrastructure.

Parameters:
res -
reportingStart -

getAllCountingResultsByArtefacts

public java.util.HashMap<CountingArtefactInformation,CountingResult> getAllCountingResultsByArtefacts()
Gets the mapping of CountingArtefactInformation to CountingResults.

Returns:
The mapping as HashMap.

getCountingArtefactsByBeginning

public java.util.HashMap<java.lang.Long,CountingArtefactInformation> getCountingArtefactsByBeginning()
Gets the CountingArtefactInformation by the time of method execution beginning. TODO does not consider forced inlining?!

Returns:
A HashMap. The long value is the time as returned by System.nanoTime().

getCountingArtefactsByMethodname

public java.util.HashMap<java.lang.String,java.util.List<CountingArtefactInformation>> getCountingArtefactsByMethodname()
Gets the CountingArtefactInformation by method name. TODO does not consider forced inlining?

Returns:
A HashMap. The String is the method name.

getCountingArtefactsByName

public java.util.List<CountingArtefactInformation> getCountingArtefactsByName(java.lang.String name)
Gets the CountingArtefactInformation by method name. TODO does not consider forced inlining?

Parameters:
name - The method name used to select the CountingArtefactInformation that is returned.
Returns:
The specified list of CountingArtefactInformation.

getCountingArtefactsByTime

public CountingArtefactInformation getCountingArtefactsByTime(long time)
Gets the CountingArtefactInformation by the time of method execution beginning. TODO does not consider forced inlining?

Parameters:
time - A time as returned by System.nanoTime().
Returns:
The specified CountingArtefactInformation.

getCountingArtefactsByTimestamp

public CountingArtefactInformation getCountingArtefactsByTimestamp(java.sql.Timestamp timestamp)
Gets the CountingArtefactInformation by the time of method execution beginning. TODO does not consider forced inlining?

Parameters:
timestamp - A time as Timestamp.
Returns:
The specified CountingArtefactInformation.

getCountingResultByMethodStartTimestamp

public CountingResult getCountingResultByMethodStartTimestamp(java.sql.Timestamp timestamp)
Gets the CountingArtefactInformation by the time of method execution beginning. Timestamp should be unique. TODO does not consider forced inlining?

Parameters:
timestamp - A time as Timestamp.
Returns:
The specified CountingResult.

retrieveCountingResultByMethodStartTime

public CountingResult retrieveCountingResultByMethodStartTime(long time)
Gets the CountingArtefactInformation by the time of method execution beginning. TODO does not consider forced inlining?

Parameters:
time - A time as returned by System.nanoTime().
Returns:
The specified CountingResult.

retrieveCountingResultByStartTime_evaluateCallingTree

public CountingResult retrieveCountingResultByStartTime_evaluateCallingTree(long callerStartTime,
                                                                            boolean suppressDebugMessages)
Gets a CountingResult that is the accumulation of all reported results of the calling tree specified by the callerStartTime. A method that reported a result at callerStartTime is the root node of the calling tree. All methods invoked from that method, and also reported results, are accumulated for the returned result.

Parameters:
callerStartTime - Start time of the method invocation for the method that is the root node of the calling tree.
suppressDebugMessages - Debug messages require additional computations. When true, these calculations will be stopped.
Returns:
The calculated CountingResult.

retrieveCountingResultsByMethodName

public java.util.SortedSet<CountingResult> retrieveCountingResultsByMethodName(java.lang.String name)
Gets the CountingResults that exist for the given method name.

Parameters:
name - The name of a method measured by ByCounter.
Returns:
A Set of CountingResults for the given name.