Class CalculatorHelper

java.lang.Object
de.uka.ipd.sdq.simucomframework.resources.CalculatorHelper

public final class CalculatorHelper extends Object
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 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 a IPassiveResourceSensor 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 appropriate BasicMeasurement will be taken and published at the ISampleBlackboard.
      Parameters:
      resource - the resource
      model - 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 resource
      model - 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 a IPassiveResourceSensor 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 appropriate BasicMeasurement will be taken and published at the ISampleBlackboard.
      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 resource
      model - 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 a DemandCalculator for the specified resource. Also a IDemandListener 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 appropriate BasicMeasurement will be taken and published at the ISampleBlackboard.
      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 resource
      model - 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 a StateCalculator for the specified resource. Also a IStateListener will be registered at the resource which gets notified of events that are relevant for calculating the state. When such an event arrives, an appropriate BasicMeasurement will be taken and published at the ISampleBlackboard.
      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 scheduledResource
      model - 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 resource
      model - 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 resource
      model - 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)