public class StdCounterStatistic extends CounterStatistic implements BatchExportable
StdCounterStatistic
extends
CounterStatistic
and provides an
implementation for a counter statistic. For printing the results it defines
the following keywords:
Modifier and Type | Field and Description |
---|---|
protected Range |
measuresRange |
protected Summation |
measuresSummation |
protected long |
sum |
sampleIndex, simNode, traceWriter
Constructor and Description |
---|
StdCounterStatistic(SimNode ownNode) |
Modifier and Type | Method and Description |
---|---|
void |
computeMeasures(int batchNumber) |
void |
exportBatch(ResultWriter writer)
Exports the batch state to a result writer.
|
double |
getConfidenceInterval() |
double |
getMaximum() |
double |
getMean() |
double |
getMinimum() |
long |
getNumberOfBatches() |
long |
getNumberOfBatchEvents() |
long |
getNumberOfEvents() |
double |
getStandardDeviation() |
void |
importBatch(ResultReader reader)
Imports the state of a batch from the result reader.
|
void |
resetBatchStatistic()
only between batches
|
void |
resetStatistic()
reset complete statistic
|
void |
update(long sample) |
getResultTypeName, printResults, update
addResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, writeTraceEntry
protected long sum
protected final Summation measuresSummation
protected final Range measuresRange
public StdCounterStatistic(SimNode ownNode)
public void exportBatch(ResultWriter writer) throws ResultException
BatchExportable
importBatch
despite the keywords.exportBatch
in interface BatchExportable
writer
- the result writer which preserves the stateResultException
- if any exception occurs while writing a result to the writerpublic void importBatch(ResultReader reader) throws ResultException
BatchExportable
exportBatch
despite the keywords.importBatch
in interface BatchExportable
reader
- the result reader which contains the batch stateResultException
- if any exception occurs while reading a result from the readerpublic double getConfidenceInterval()
getConfidenceInterval
in class CounterStatistic
public double getStandardDeviation()
getStandardDeviation
in class CounterStatistic
public double getMaximum()
getMaximum
in class CounterStatistic
public double getMean()
getMean
in class CounterStatistic
public double getMinimum()
getMinimum
in class CounterStatistic
public long getNumberOfBatchEvents()
getNumberOfBatchEvents
in class CounterStatistic
public long getNumberOfBatches()
getNumberOfBatches
in class CounterStatistic
public long getNumberOfEvents()
getNumberOfEvents
in class CounterStatistic
public void update(long sample)
update
in class CounterStatistic
public void computeMeasures(int batchNumber)
computeMeasures
in class Statistic
public void resetBatchStatistic()
Statistic
resetBatchStatistic
in class Statistic
public void resetStatistic()
Statistic
resetStatistic
in class Statistic