Class CalculatorHelper
java.lang.Object
de.uka.ipd.sdq.simucomframework.resources.CalculatorHelper
Offers static methods to setup different types of calculators for resources like
AbstractScheduledResource
and IPassiveResource
.
TODO Some calculators are created in AbstractMain. Why is that? [Lehrig]-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static List<org.palladiosimulator.probeframework.probes.Probe>
buildStartStopProbes
(SimuComModel model) static org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint
createMeasuringPoint
(AbstractScheduledResource scheduledResource, int replicaID) static org.palladiosimulator.probeframework.probes.EventProbeList
getEventProbeSetWithCurrentTime
(org.palladiosimulator.metricspec.MetricSetDescription metricSetDescription, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control, org.palladiosimulator.probeframework.probes.EventProbe<?> additionalProbe) static org.palladiosimulator.probeframework.probes.TriggeredProbeList
getTriggeredProbeSetWithCurrentTime
(org.palladiosimulator.metricspec.MetricSetDescription metricSetDescription, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control, org.palladiosimulator.probeframework.probes.TriggeredProbe additionalProbe) static org.palladiosimulator.probeframework.calculator.Calculator
setupActiveResourceStateCalculator
(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, int replicaID) Sets up aStateCalculator
for the specified resource.static List<org.palladiosimulator.probeframework.calculator.Calculator>
setupActiveResourceStateCalculators
(AbstractScheduledResource scheduledResource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupDemandCalculator
(AbstractScheduledResource scheduledResource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupDemandCalculator
(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up aDemandCalculator
for the specified resource.static org.palladiosimulator.probeframework.calculator.Calculator
setupHoldTimeCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupHoldTimeCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up a HoldingTimeCalculator for the specified resource.static org.palladiosimulator.probeframework.calculator.Calculator
setupOverallUtilizationCalculator
(AbstractScheduledResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupOverallUtilizationCalculator
(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) static org.palladiosimulator.probeframework.calculator.Calculator
setupPassiveResourceStateCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupPassiveResourceStateCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) static org.palladiosimulator.probeframework.calculator.Calculator
setupWaitingTimeCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.static org.palladiosimulator.probeframework.calculator.Calculator
setupWaitingTimeCalculator
(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up a WaitingTimeCalculator for the specified resource.
-
Constructor Details
-
CalculatorHelper
public CalculatorHelper()
-
-
Method Details
-
setupWaitingTimeCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupWaitingTimeCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up a WaitingTimeCalculator for the specified resource. Also aIPassiveResourceSensor
will be registered at the resource which gets notified of events that are relevant for calculating the waiting time. When such an event arrives, an appropriateBasicMeasurement
will be taken and published at theISampleBlackboard
.- Parameters:
resource
- the resourcemodel
- the Simucom Model
-
setupWaitingTimeCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupWaitingTimeCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.- Parameters:
resource
- the resourcemodel
- the Simucom Model
-
setupHoldTimeCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupHoldTimeCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up a HoldingTimeCalculator for the specified resource. Also aIPassiveResourceSensor
will be registered at the resource which gets notified of events that are relevant for calculating the hold time. When such an event arrives, an appropriateBasicMeasurement
will be taken and published at theISampleBlackboard
.- Parameters:
r
- the resource
-
setupHoldTimeCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupHoldTimeCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.- Parameters:
resource
- the resourcemodel
- the Simucom Model
-
buildStartStopProbes
protected static List<org.palladiosimulator.probeframework.probes.Probe> buildStartStopProbes(SimuComModel model) - Parameters:
model
-- Returns:
-
setupDemandCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupDemandCalculator(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Sets up aDemandCalculator
for the specified resource. Also aIDemandListener
will be registered at the resource which gets notified of events that are relevant for calculating the demanded time. When such an event arrives, an appropriateBasicMeasurement
will be taken and published at theISampleBlackboard
.- Parameters:
scheduledResource
- the resource
-
setupDemandCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupDemandCalculator(AbstractScheduledResource scheduledResource, SimuComModel model) Convenient method in case measuring point has to be created anew.- Parameters:
scheduledResource
- the resourcemodel
- the Simucom Model
-
setupActiveResourceStateCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupActiveResourceStateCalculator(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, int replicaID) Sets up aStateCalculator
for the specified resource. Also aIStateListener
will be registered at the resource which gets notified of events that are relevant for calculating the state. When such an event arrives, an appropriateBasicMeasurement
will be taken and published at theISampleBlackboard
.- Parameters:
scheduledResource
- the resource
-
setupActiveResourceStateCalculators
public static List<org.palladiosimulator.probeframework.calculator.Calculator> setupActiveResourceStateCalculators(AbstractScheduledResource scheduledResource, SimuComModel model) Convenient method in case measuring point has to be created anew. Creates a calculator for each instance of the active resource, e.g., representing cores.- Parameters:
resource
- the scheduledResourcemodel
- the Simucom Model- Returns:
-
setupOverallUtilizationCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupOverallUtilizationCalculator(AbstractScheduledResource scheduledResource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) -
setupOverallUtilizationCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupOverallUtilizationCalculator(AbstractScheduledResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.- Parameters:
scheduledResource
- the resourcemodel
- the Simucom Model
-
setupPassiveResourceStateCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupPassiveResourceStateCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) -
setupPassiveResourceStateCalculator
public static org.palladiosimulator.probeframework.calculator.Calculator setupPassiveResourceStateCalculator(de.uka.ipd.sdq.scheduler.IPassiveResource resource, SimuComModel model) Convenient method in case measuring point has to be created anew.- Parameters:
scheduledResource
- the resourcemodel
- the Simucom Model
-
getTriggeredProbeSetWithCurrentTime
public static org.palladiosimulator.probeframework.probes.TriggeredProbeList getTriggeredProbeSetWithCurrentTime(org.palladiosimulator.metricspec.MetricSetDescription metricSetDescription, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control, org.palladiosimulator.probeframework.probes.TriggeredProbe additionalProbe) -
getEventProbeSetWithCurrentTime
public static org.palladiosimulator.probeframework.probes.EventProbeList getEventProbeSetWithCurrentTime(org.palladiosimulator.metricspec.MetricSetDescription metricSetDescription, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control, org.palladiosimulator.probeframework.probes.EventProbe<?> additionalProbe) -
createMeasuringPoint
public static org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint createMeasuringPoint(AbstractScheduledResource scheduledResource, int replicaID)
-