public final class SlidingWindowExponentialSmoothingUtilizationAggregator extends SlidingWindowUtilizationAggregator
SlidingWindowUtilizationAggregator
implementation which
calculates the utilization or, (which is more precisely in the scope of this class), the average
load) of an active resource based on a sequence of
(point in time, state of active resource)
or
(point in time, utilization of active resource)
tuples collected by a
SlidingWindow
by employing the algorithm that is used in the Linux kernel to compute the
average load (Details of this algorithm can be found
in this paper, or more
succinctly, in this presentation
both due to Neil Gunther). IRecorder
s in the form of a
(point in time, utilization of active resource)
tuple each time this implementation
processes new window data. Such a point in time is referred to as reporting period and
equal to the length of the corresponding SlidingWindow
. α
derived from the given sampling rate and reporting period.SlidingWindowRecorder
,
SlidingWindowUtilizationAggregator.getAllowedWindowDataMetrics()
Constructor and Description |
---|
SlidingWindowExponentialSmoothingUtilizationAggregator(org.palladiosimulator.metricspec.MetricDescription windowDataMetric,
org.palladiosimulator.recorderframework.IRecorder recorderToWriteInto,
javax.measure.Measurable<javax.measure.quantity.Duration> samplingRate,
javax.measure.Measurable<javax.measure.quantity.Duration> reportingPeriod)
Initializes a new instance of the
SlidingWindowExponentialSmoothingUtilizationAggregator class with the given
arguments. |
Modifier and Type | Method and Description |
---|---|
javax.measure.Measurable<javax.measure.quantity.Duration> |
getSamplingRate() |
double |
getSmoothingFactor() |
getAllowedWindowDataMetrics, getExpectedWindowDataMetric
addRecorder, onSlidingWindowFull
public SlidingWindowExponentialSmoothingUtilizationAggregator(org.palladiosimulator.metricspec.MetricDescription windowDataMetric, org.palladiosimulator.recorderframework.IRecorder recorderToWriteInto, javax.measure.Measurable<javax.measure.quantity.Duration> samplingRate, javax.measure.Measurable<javax.measure.quantity.Duration> reportingPeriod)
SlidingWindowExponentialSmoothingUtilizationAggregator
class with the given
arguments.windowDataMetric
- The MetricDescription
of the measurements to be processed, i.e, which are
used to compute the utilization.recorderToWriteInto
- An IRecorder
this instance writes the aggregated window data into.
Typically, a recorder that writes into a persistence framework like EDP 2 is
passed here.samplingRate
- An Amount
denoting the sampling rate which equals the increment of the
associated SlidingWindow
.reportingPeriod
- An Amount
describing the reporting period which is simply the length of
the associated SlidingWindow
.java.lang.NullPointerException
- If any of the arguments is null
.java.lang.IllegalArgumentException
- If the given metric is not supported by this aggregator, or either of the given
amounts is not positive.