public class MedianTimeMeter extends TimeMeter
MedianTimeMeter
uses a median statistic of type
StdMedianStatistic
to collect the time interval data. If the
parameter maxBufferSize
is set to zero, all samples will be
stored internally and the median will be calculated at the end of the
simulation. Since this is very memory consuming, maxBufferSize
can be set to a number > 0, which determines the maximum number of samples
the statistic should hold in memory. The median is then calculated at the end
of the simulation as an approximation that is based on all samples. Often,
10000 samples are sufficient for a good approximation.StdMedianStatistic
Modifier and Type | Field and Description |
---|---|
protected MedianStatistic |
transferTime |
fromPortHandler, toPortHandler
Constructor and Description |
---|
MedianTimeMeter(java.lang.String name,
SimNode owner) |
MedianTimeMeter(java.lang.String name,
SimNode parentNode,
int maxBufferSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
evaluateTimeStamp(TimeStamp ts,
double currentTime) |
protected boolean |
useMessage(Message msg)
filters messages that should be used for transfer time measurement
|
addTimeStamp, evaluateMessageFromPort, evaluateMessageToPort, getAndRemoveTimeStamp
attachFromPort, attachFromPort, attachToPort, attachToPort
protected MedianStatistic transferTime
public MedianTimeMeter(java.lang.String name, SimNode parentNode, int maxBufferSize)
public MedianTimeMeter(java.lang.String name, SimNode owner)
protected void evaluateTimeStamp(TimeStamp ts, double currentTime)
evaluateTimeStamp
in class TimeMeter
protected boolean useMessage(Message msg)
TimeMeter
useMessage
in class TimeMeter