Class EvaluationScope

  • All Implemented Interfaces:
    Iterable<Map<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification,​Map<org.palladiosimulator.metricspec.MetricDescription,​org.palladiosimulator.measurementframework.MeasuringValue>>>

    public final class EvaluationScope
    extends AbstractEvaluationScope
    This class represents the scope under which the energy consumption of a software system is evaluated. It subsumes a set of measurements or probes on the measurement. Specifically, a set of MetricDescriptionConstants.STATE_OF_ACTIVE_RESOURCE_METRIC_TUPLE on resources is translated into a set of discrete evaluations on the utilization.
    • Method Detail

      • createScope

        public static EvaluationScope createScope​(Iterable<org.palladiosimulator.edp2.datastream.IDataSource> experimentMeasurements,
                                                  Collection<ExtendedMeasureProvider> extendedMeasureProviders)
        Creates an evaluation scope for which the energy consumption of a software system is evaluated. The scope is created for a set of available experimentMeasures.
        Parameters:
        experimentMeasurements - set of measurement sources each collected on an active resource within the system.
        extendedMeasureProviders - collection of extended measurement providers, allowing to derive one metric from another (e.g. MetricDescriptionConstants.UTILIZATION_TUPLE measurements from MetricDescriptionConstants.STATE_OF_ACTIVE_RESOURCE_TUPLE measurements)
        Returns:
        The created scope representing the context for the energy consumption evaluation.
        Throws:
        NullPointerException - In case either of the arguments is null.
      • setResourceMetricsToEvaluate

        public void setResourceMetricsToEvaluate​(Map<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification,​Set<org.palladiosimulator.metricspec.MetricDescription>> metricsMap)
        Description copied from class: AbstractEvaluationScope
        Sets for each ProcessingResourceSpecification which metrics are supposed to be evaluated. The method is to be provided by implementing subclasses.
        A call to this method results in initializing the resourceMeasurements used to when iterating the scope. If for a certain ProcessingResourceSpecification and MetricDescription there are no measurements available or there is no way to create the measurements from the available data, an IllegalArgumentException is thrown.
        Specified by:
        setResourceMetricsToEvaluate in class AbstractEvaluationScope
        Parameters:
        metricsMap - the Map linking ProcessingResourceSpecifications to the metrics needed by the AbstractResourcePowerModelCalculator in use.