|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
de.uka.ipd.sdq.ByCounter.execution.CountingResultCollector
public final class CountingResultCollector
Class used to collect statistics about an instrumented method.
This class is observable (Observable.addObserver(java.util.Observer)
) and can
provide online updates on the collection of results. Updates consist of
update objects with types implementing the CountingResultCollector.ObservedEvent
interface.
The following update
types are currently available:
CountingResultCollector.ObservedSectionExecutionUpdate
CountingResultCollector.ObservedCompleteMethodExecutionUpdate
Nested Class Summary | |
---|---|
class |
CountingResultCollector.ObservedCompleteMethodExecutionUpdate
This class is used to update observers registered to CountingResultCollector when a complete method has been executed,
i.e. reached a return statement or a throw statement. |
static interface |
CountingResultCollector.ObservedEvent
This is the common interface of CountingResultCollector events
that can be observed. |
class |
CountingResultCollector.ObservedSectionExecutionUpdate
This class is used to update observers registered to CountingResultCollector when a section has been executed. |
Field Summary | |
---|---|
BlockDefinitionContext |
blockContext
Basic block and range block definitions. |
static CountingResultCollectorMode |
MODE_DEFAULT
Default value for getMode() . |
static java.lang.String |
SIGNATURE_protocolCount
The bytecode parameter descriptor for protocolCount(ProtocolCountStructure) . |
Method Summary | |
---|---|
void |
clearResults()
Clear all results in the internal list. |
java.util.List<ICountingResultWriter> |
getAllResultWriters()
Gets all result writers registered to the collector. |
CountingResultIndexing |
getCountingResultIndexing()
|
static CountingResultCollector |
getInstance()
Public singleton accessor. |
MethodExecutionRecord |
getLastMethodExecutionDetails()
The settings used for the last execution relevant to the CountingResultCollector . |
CountingResultCollectorMode |
getMode()
|
boolean |
getMonitorShouldStop()
Deprecated. because only GUI-used but the GUI is outdated |
void |
monitorShouldStop()
Deprecated. because only GUI-used but the GUI is outdated |
void |
protocolCount(ProtocolCountStructure result)
An instrumented class calls this method to report the instruction and method call counts. |
void |
registerWriter(ICountingResultWriter resultWriter)
Adds an additional result writer used in CountingResult.logResult(boolean, boolean, Level) . |
java.util.SortedSet<CountingResult> |
retrieveAllCountingResults()
Get all results the CountingResultCollector holds. |
void |
setLastMethodExecutionDetails(MethodExecutionRecord lastMethodExecutionDetails)
This is called by BytecodeCounter when an execute method is
executed to provide the details of the execution to
CountingResultCollector . |
void |
setMonitorShouldStop(boolean monitorShouldStop)
Deprecated. because only GUI-used but the GUI is outdated |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CountingResultCollectorMode MODE_DEFAULT
getMode()
.
public static final java.lang.String SIGNATURE_protocolCount
protocolCount(ProtocolCountStructure)
.
public BlockDefinitionContext blockContext
Method Detail |
---|
public static CountingResultCollector getInstance()
CountingResultCollector
.public void clearResults()
public java.util.List<ICountingResultWriter> getAllResultWriters()
ICountingResultWriter
s.public CountingResultCollectorMode getMode()
BytecodeCounter.setExecutionSettings(ExecutionSettings)
public boolean getMonitorShouldStop()
public void monitorShouldStop()
public void protocolCount(ProtocolCountStructure result)
result
- The result reported by an instrumented method.public void registerWriter(ICountingResultWriter resultWriter)
CountingResult.logResult(boolean, boolean, Level)
.
resultWriter
- ICountingResultWriter
used when logging result.public java.util.SortedSet<CountingResult> retrieveAllCountingResults()
CountingResultCollector
holds.
This does not clear the CountingResultCollector
list.
You have to explicitly
call clearResults()
if that is your intention.
Result
list.public void setMonitorShouldStop(boolean monitorShouldStop)
monitorShouldStop
- public void setLastMethodExecutionDetails(MethodExecutionRecord lastMethodExecutionDetails)
BytecodeCounter
when an execute method is
executed to provide the details of the execution to
CountingResultCollector
.
Do not call; instead use BytecodeCounter.setExecutionSettings(ExecutionSettings)
.
lastMethodExecutionDetails
- Method execution details.public MethodExecutionRecord getLastMethodExecutionDetails()
CountingResultCollector
.
Do not call to change these settings.
Instead, use BytecodeCounter.setExecutionSettings(ExecutionSettings)
.
setLastMethodExecutionDetails(MethodExecutionRecord)
public CountingResultIndexing getCountingResultIndexing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |