Class TimeSpanCalculator
- java.lang.Object
-
- org.palladiosimulator.metricspec.metricentity.MetricEntity
-
- org.palladiosimulator.measurementframework.listener.MeasurementSource
-
- org.palladiosimulator.probeframework.calculator.Calculator
-
- org.palladiosimulator.probeframework.calculator.internal.TimeSpanCalculator
-
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener>
,org.palladiosimulator.metricspec.metricentity.IMetricEntity
,IProbeListener
- Direct Known Subclasses:
HoldingTimeCalculator
,ResponseTimeCalculator
,WaitingTimeCalculator
public class TimeSpanCalculator extends Calculator
Time span calculators calculate a time span. These calculators expect two probes, each providing at least a POINT_IN_TIME_METRIC measurement. Subsequently, they calculate the time span by subtracting the point in time of the first probe from the point in time of the second probe. The final result is a (start point in time, time span)-tuple.
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.probeframework.calculator.Calculator
probes
-
-
Constructor Summary
Constructors Constructor Description TimeSpanCalculator(org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, List<Probe> probes)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.palladiosimulator.measurementframework.MeasuringValue
calculate(List<ProbeMeasurement> probeMeasurements)
Calculates a time span based on subtracting two points in time.-
Methods inherited from class org.palladiosimulator.probeframework.calculator.Calculator
equals, getMeasuringPoint, hashCode, newProbeMeasurementAvailable, preUnregister
-
Methods inherited from class org.palladiosimulator.measurementframework.listener.MeasurementSource
addObserver, getMeasurementSourceListeners, notifyMeasurementSourceListener, removeObserver
-
-
-
-
Constructor Detail
-
TimeSpanCalculator
public TimeSpanCalculator(org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, List<Probe> probes)
Default constructor.- Parameters:
metricDescription
- MetricDescription as needed by the superclass.measuringPoint
- MeasuringPoint as needed by the superclass.probes
- Probes as needed by the superclass.
-
-
Method Detail
-
calculate
protected org.palladiosimulator.measurementframework.MeasuringValue calculate(List<ProbeMeasurement> probeMeasurements)
Calculates a time span based on subtracting two points in time.- Specified by:
calculate
in classCalculator
- Parameters:
probeMeasurements
- List containing the two points in time probes measurements.- Returns:
- The newly calculated measurement.
- See Also:
Calculator.calculate(java.util.List<org.palladiosimulator.probeframework.measurement.ProbeMeasurement>)
-
-