Package org.palladiosimulator.edp2.util
Class MeasurementsUtility
java.lang.Object
org.palladiosimulator.edp2.util.MeasurementsUtility
This class provides utility functions to handle measurements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MeasurementRangeaddMeasurementRange(Measurement measurement) Creates a new MeasurementRange and contained elements if there are already existing elements in another MeasurementRange.static voidCreates the DAOs for the data series of a raw measurement.static voidCloses the data store behind the repository if necessary.static voidOpens the data store behind the repository if necessary.static <Q extends javax.measure.quantity.Quantity>
MeasurementsDao<?,Q> Requests a DAO for a ordinal measurement.static MeasuringTypegetMeasuringTypeFromRawMeasurements(RawMeasurements rawMeasurements) static org.palladiosimulator.metricspec.MetricDescriptiongetMetricDescriptionFromRawMeasurements(RawMeasurements rawMeasurements) static org.palladiosimulator.metricspec.TextualBaseMetricDescriptiongetTextualBaseMetricDescriptionFromIdentifierMeasurement(IdentifierBasedMeasurements idBasedMeasurement) static voidstoreMeasurement(Measurement measurement, org.palladiosimulator.measurementframework.MeasuringValue measuringValue) Stores a new measurement at the last existing range.
-
Field Details
-
SLIDING_WINDOW_BASED_MEASUREMENT_TAG_KEY
- See Also:
-
SLIDING_WINDOW_BASED_MEASUREMENT_TAG_VALUE
-
-
Constructor Details
-
MeasurementsUtility
public MeasurementsUtility()
-
-
Method Details
-
addMeasurementRange
Creates a new MeasurementRange and contained elements if there are already existing elements in another MeasurementRange. Does not set the startTime and endTime properties.- Parameters:
measurement- Location where to add the range.- Returns:
- The newly created measurement range.
-
createDAOsForRawMeasurements
Creates the DAOs for the data series of a raw measurement.- Parameters:
rm- The raw measurements containing the data series.
-
storeMeasurement
public static void storeMeasurement(Measurement measurement, org.palladiosimulator.measurementframework.MeasuringValue measuringValue) Stores a new measurement at the last existing range.- Parameters:
measuringValue- The measurement of the experiment run for which a new measurement exists.data- The measurement (data) itself.
-
getMeasurementsDao
public static <Q extends javax.measure.quantity.Quantity> MeasurementsDao<?,Q> getMeasurementsDao(DataSeries ds) Requests a DAO for a ordinal measurement. If the DAO does not exists it is created and opened automatically (if possible).- Parameters:
ds- The data series for which the DAO should be created.- Returns:
- DAO for ordinal measurements.
-
getMeasuringTypeFromRawMeasurements
-
getMetricDescriptionFromRawMeasurements
public static org.palladiosimulator.metricspec.MetricDescription getMetricDescriptionFromRawMeasurements(RawMeasurements rawMeasurements) -
getTextualBaseMetricDescriptionFromIdentifierMeasurement
public static org.palladiosimulator.metricspec.TextualBaseMetricDescription getTextualBaseMetricDescriptionFromIdentifierMeasurement(IdentifierBasedMeasurements idBasedMeasurement) -
ensureOpenRepository
Opens the data store behind the repository if necessary. Access is only allowed to opened repositories. Repositories may be reopened (and the also reclosed).- Parameters:
repo- Repository which should be opened.- Throws:
DataNotAccessibleException- if access to the repository fails.
-
ensureClosedRepository
Closes the data store behind the repository if necessary. Access is only allowed to opened repositories. Repositories may be reopened (and the also reclosed).- Parameters:
repo- Repository which should be closed.- Throws:
DataNotAccessibleException- if access to the repository fails.
-