Class MeasurementsUtility

java.lang.Object
org.palladiosimulator.edp2.util.MeasurementsUtility

public class MeasurementsUtility extends Object
This class provides utility functions to handle measurements.
  • Field Details

    • SLIDING_WINDOW_BASED_MEASUREMENT_TAG_KEY

      public static final String SLIDING_WINDOW_BASED_MEASUREMENT_TAG_KEY
      See Also:
    • SLIDING_WINDOW_BASED_MEASUREMENT_TAG_VALUE

      public static final Boolean SLIDING_WINDOW_BASED_MEASUREMENT_TAG_VALUE
  • Constructor Details

    • MeasurementsUtility

      public MeasurementsUtility()
  • Method Details

    • addMeasurementRange

      public static MeasurementRange addMeasurementRange(Measurement measurement)
      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

      public static void createDAOsForRawMeasurements(RawMeasurements rm)
      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

      public static MeasuringType getMeasuringTypeFromRawMeasurements(RawMeasurements rawMeasurements)
    • getMetricDescriptionFromRawMeasurements

      public static org.palladiosimulator.metricspec.MetricDescription getMetricDescriptionFromRawMeasurements(RawMeasurements rawMeasurements)
    • getTextualBaseMetricDescriptionFromIdentifierMeasurement

      public static org.palladiosimulator.metricspec.TextualBaseMetricDescription getTextualBaseMetricDescriptionFromIdentifierMeasurement(IdentifierBasedMeasurements idBasedMeasurement)
    • ensureOpenRepository

      public static void ensureOpenRepository(Repository repo) throws DataNotAccessibleException
      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

      public static void ensureClosedRepository(Repository repo) throws DataNotAccessibleException
      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.