Package de.fzi.power.interpreter
Class EvaluationScope
- java.lang.Object
-
- de.fzi.power.interpreter.AbstractEvaluationScope
-
- de.fzi.power.interpreter.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 ofMetricDescriptionConstants.STATE_OF_ACTIVE_RESOURCE_METRIC_TUPLE
on resources is translated into a set of discrete evaluations on the utilization.
-
-
Field Summary
-
Fields inherited from class de.fzi.power.interpreter.AbstractEvaluationScope
iterator, resourceMeasurements
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
reset()
Resets the context to its initial state.void
setResourceMetricsToEvaluate(Map<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification,Set<org.palladiosimulator.metricspec.MetricDescription>> metricsMap)
Sets for eachProcessingResourceSpecification
which metrics are supposed to be evaluated.-
Methods inherited from class de.fzi.power.interpreter.AbstractEvaluationScope
getCurrentPointInTime, getMeasurements, getMeasurementsForProcessingResource, hasNext, iterator, next
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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 availableexperimentMeasures
.- 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 fromMetricDescriptionConstants
.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 isnull
.
-
reset
public void reset()
Resets the context to its initial state.- Overrides:
reset
in classAbstractEvaluationScope
- See Also:
AbstractEvaluationScope.next()
-
setResourceMetricsToEvaluate
public void setResourceMetricsToEvaluate(Map<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification,Set<org.palladiosimulator.metricspec.MetricDescription>> metricsMap)
Description copied from class:AbstractEvaluationScope
Sets for eachProcessingResourceSpecification
which metrics are supposed to be evaluated. The method is to be provided by implementing subclasses.
A call to this method results in initializing theresourceMeasurements
used to when iterating the scope. If for a certainProcessingResourceSpecification
andMetricDescription
there are no measurements available or there is no way to create the measurements from the available data, anIllegalArgumentException
is thrown.- Specified by:
setResourceMetricsToEvaluate
in classAbstractEvaluationScope
- Parameters:
metricsMap
- the Map linkingProcessingResourceSpecification
s to the metrics needed by theAbstractResourcePowerModelCalculator
in use.
-
-