public abstract class IntervalRateMeter
extends java.lang.Object
Constructor and Description |
---|
IntervalRateMeter() |
Modifier and Type | Method and Description |
---|---|
static MessageLengthMeter |
create(Duration interval,
UnweightedSampleCollector<java.lang.Double> statistic)
Helper method to create something which resembles the
ShortTermRateMeter , which was included in previous versions
of this library. |
public static MessageLengthMeter create(Duration interval, UnweightedSampleCollector<java.lang.Double> statistic)
ShortTermRateMeter
, which was included in previous versions
of this library. Combines a MessageLengthMeter
with an
IntervalAggregatingStatistic
, so that the average rate over an
interval is calculated. Unit of measurement is message length units per
second.
The returned meter can be connected to one or to multiple ports. If it is connected to multiple ports, the sum rate over all these ports is calculated and written to the statistic.
To resemble the behaviour of the ShortTermRateMeter
with the
parameter measurePortsIndividually
set to true, create
multiple of these meters which are backed by a single instance of a
statistic.
interval
- duration of the averaging intervalstatistic
- the statistic which is updated with the aggregated values