Class CalculatorProbeSetBasedInferingCalculatorFactory

java.lang.Object
org.palladiosimulator.probeframework.calculator.CalculatorProbeSetBasedInferingCalculatorFactory
All Implemented Interfaces:
IGenericCalculatorFactory

public class CalculatorProbeSetBasedInferingCalculatorFactory extends Object implements IGenericCalculatorFactory
This factory is not supposed to be used directly, but as a fallback implementation in case no specialized calculator factory is available. It uses information about the available probes to select the appropriate calculator. This factory uses a simple heuristic:
  • if a single probe is provided, an IdentityCalculator for the respective metric is created.
  • if there is a start and stop probe, a TimeSpanCalculator is created.
  • Constructor Details

    • CalculatorProbeSetBasedInferingCalculatorFactory

      public CalculatorProbeSetBasedInferingCalculatorFactory()
  • Method Details

    • buildCalculator

      public Calculator buildCalculator(org.palladiosimulator.metricspec.MetricDescription metric, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, CalculatorProbeSet probeConfiguration)
      Creates a new Calculator for the given MetricDescription
      Specified by:
      buildCalculator in interface IGenericCalculatorFactory
      Parameters:
      metric - the metric which is calculated based on the probe measurements.
      measuringPoint - the measuring point where this calculator is used
      probeConfiguration - the configuration of probes required by the calculator of the metric.
      Returns:
      the desired calculator