public class MedianTimeMeter extends TimeMeter implements ReflectionConstructable2<SimNode,Parameters>
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
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
MedianTimeMeter(SimNode ownNode) |
MedianTimeMeter(SimNode ownNode,
int maxBufferSize) |
Modifier and Type | Method and Description |
---|---|
static MedianTimeMeter |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
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(SimNode ownNode, int maxBufferSize)
public MedianTimeMeter(SimNode ownNode)
public static MedianTimeMeter createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
protected void evaluateTimeStamp(TimeStamp ts, double currentTime)
evaluateTimeStamp
in class TimeMeter
protected boolean useMessage(Message msg)
TimeMeter
useMessage
in class TimeMeter