public class StdCounterStatistic extends CounterStatistic implements BatchExportable
StdCounterStatistic 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(java.lang.String name,
SimNode parentNode) |
| 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, updateaddResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, writeTraceEntryprotected long sum
protected final Summation measuresSummation
protected final Range measuresRange
public StdCounterStatistic(java.lang.String name,
SimNode parentNode)
public void exportBatch(ResultWriter writer) throws ResultException
BatchExportableimportBatch despite the keywords.exportBatch in interface BatchExportablewriter - the result writer which preserves the stateResultException - if any exception occurs while writing a result to the writerpublic void importBatch(ResultReader reader) throws ResultException
BatchExportableexportBatch despite the keywords.importBatch in interface BatchExportablereader - the result reader which contains the batch stateResultException - if any exception occurs while reading a result from the readerpublic double getConfidenceInterval()
getConfidenceInterval in class CounterStatisticpublic double getStandardDeviation()
getStandardDeviation in class CounterStatisticpublic double getMaximum()
getMaximum in class CounterStatisticpublic double getMean()
getMean in class CounterStatisticpublic double getMinimum()
getMinimum in class CounterStatisticpublic long getNumberOfBatchEvents()
getNumberOfBatchEvents in class CounterStatisticpublic long getNumberOfBatches()
getNumberOfBatches in class CounterStatisticpublic long getNumberOfEvents()
getNumberOfEvents in class CounterStatisticpublic void update(long sample)
update in class CounterStatisticpublic void computeMeasures(int batchNumber)
computeMeasures in class Statisticpublic void resetBatchStatistic()
StatisticresetBatchStatistic in class Statisticpublic void resetStatistic()
StatisticresetStatistic in class Statistic