public class IATMeter extends OnePointMeter
useMessage(Message)
method can be overridden to use only those
messages for measurement that satisfy certain criteria, e.g., based on
message content, or message type.portHandler
Modifier | Constructor and Description |
---|---|
protected |
IATMeter(UnweightedSampleCollector<Duration> statistic) |
Modifier and Type | Method and Description |
---|---|
static IATMeter |
createWithDoubleStatistic(UnweightedSampleCollector<java.lang.Double> statistic)
creates a new
IATMeter with a statistic that accepts Double
values. |
static IATMeter |
createWithDurationStatistic(UnweightedSampleCollector<Duration> statistic)
creates a new
IATMeter with a statistic that accepts Duration
objects |
protected void |
evaluateMessage(Message msg,
Port port) |
protected void |
evaluateSample(PointInTime prevMessageTime,
PointInTime thisMessageTime)
called when a message was seen
|
protected boolean |
useMessage(Message msg)
filters messages that should be used for IAT measurement
|
attachInput, attachInput
protected IATMeter(UnweightedSampleCollector<Duration> statistic)
public static IATMeter createWithDurationStatistic(UnweightedSampleCollector<Duration> statistic)
IATMeter
with a statistic that accepts Duration
objectsstatistic
- statistic to fill with the valuesIATMeter
public static IATMeter createWithDoubleStatistic(UnweightedSampleCollector<java.lang.Double> statistic)
IATMeter
with a statistic that accepts Double
values. The measured durations are converted to seconds and then filled
into the statistic.statistic
- statistic to fill with the valuesIATMeter
protected void evaluateSample(PointInTime prevMessageTime, PointInTime thisMessageTime)
prevMessageTime
- the time the previous message was seenthisMessageTime
- the time this message was seen (now)protected boolean useMessage(Message msg)
msg
- the observed messageprotected void evaluateMessage(Message msg, Port port)
evaluateMessage
in class OnePointMeter