public abstract class Statistic
extends java.lang.Object
resetStatistic()
, resetBatchStatistic()
, and
computeMeasures(int)
as an interface.Modifier and Type | Field and Description |
---|---|
protected int |
sampleIndex |
protected StdSimNode |
simNode |
protected ResultWriter |
traceWriter
Writer object to write trace entries
|
Constructor and Description |
---|
Statistic(java.lang.String name,
SimNode parent) |
Modifier and Type | Method and Description |
---|---|
void |
addResultTag(ResultKeyword keyword,
java.lang.String value)
Adds a tag (keyword and value) to the output of this statistic in the
final results file.
|
void |
addResultTag(java.lang.String keyword,
java.lang.String value)
Convenience method which creates a new result keyword from a string.
|
abstract void |
computeMeasures(int batchNumber) |
void |
disableTracing()
Un-sets the writer object and disables tracing
|
void |
enableTracing(ResultWriter writer)
Sets the writer object and enables tracing
|
void |
handleInitSimulation() |
void |
handleStartBatch(int batchNumber) |
void |
handleStartTransientPhase() |
void |
handleStopBatch(int batchNumber) |
void |
handleStopTransientPhase() |
protected void |
printComments(PrintResultWriter writer) |
abstract void |
resetBatchStatistic()
only between batches
|
abstract void |
resetStatistic()
reset complete statistic
|
protected void |
update()
Basic update method, that triggers the output of trace entries
|
protected void |
writeTraceEntry()
Abstract method to be overwritten by derived statistics to output trace
entries
|
protected final StdSimNode simNode
protected ResultWriter traceWriter
protected int sampleIndex
public Statistic(java.lang.String name, SimNode parent)
public abstract void resetStatistic()
public abstract void resetBatchStatistic()
public abstract void computeMeasures(int batchNumber)
public void addResultTag(ResultKeyword keyword, java.lang.String value)
addResultTag(ResultKeywords.UNIT, "bytes")
.keyword
- the keyvalue
- the valuepublic void addResultTag(java.lang.String keyword, java.lang.String value)
keyword
- the keyvalue
- the valueaddResultTag(ResultKeyword, String)
protected void printComments(PrintResultWriter writer)
public void handleInitSimulation()
public void handleStartBatch(int batchNumber)
public void handleStartTransientPhase()
public void handleStopBatch(int batchNumber)
public void handleStopTransientPhase()
protected void update()
public void enableTracing(ResultWriter writer)
writer
- ResultWriter
connected to trace filepublic void disableTracing()
protected void writeTraceEntry()