Class ExperimentManager

    • Field Detail

      • LOGGER

        protected static final org.apache.log4j.Logger LOGGER
    • Method Detail

      • getExperiment

        public static de.uka.ipd.sdq.sensorframework.entities.Experiment getExperiment()
      • addExperimentRun

        public static de.uka.ipd.sdq.sensorframework.entities.ExperimentRun addExperimentRun()
        Adds a new experiment run to the experiment. Current date is used for as date.
        Returns:
        the newly created experiment run
      • takeStartTimeForInnerMeasurement

        public static long takeStartTimeForInnerMeasurement()
        Restored this from an older version. Will be changed eventually.
        Returns:
      • takeMeasurement

        public static void takeMeasurement​(long start,
                                           de.uka.ipd.sdq.sensorframework.entities.ExperimentRun experimentRun,
                                           de.uka.ipd.sdq.sensorframework.entities.TimeSpanSensor timeSpanSensor)
        Takes a measurement (from start time till current time) on the given sensor
        Parameters:
        start - start time
        experimentRun -
        timeSpanSensor - sensor
      • createOrReuseTimeSpanSensor

        public static de.uka.ipd.sdq.sensorframework.entities.TimeSpanSensor createOrReuseTimeSpanSensor​(String sensorName)
        Returns a TimeSpanSensor in the experiment that has the name sensorName. Creates a new sensor and returns it of no sensor with this name exists. The reuse is required because the EJB container may decide at times to create new instances of the components, so for one component type and one signature, this method may be called multiple times during the measurements. We want to store all results per component type into one sensor, though.
        Parameters:
        sensorName - The sensor name to match
        Returns:
        The TimeSpanSensor with the passed name or a new TimeSpanSensor with that name that is then also added to the experiment.
      • getLatestExperimentRun

        public static de.uka.ipd.sdq.sensorframework.entities.ExperimentRun getLatestExperimentRun()
        Returns the newest experiment run instance. If no one exists, a new experiment run will be created. Note that the experiment run usually should be created explicitly and not here. This one is just a (quick) fix to get measurements from sensors running on instances different from the usage scenario.
        Returns:
        latest experiment run instance or a new one
      • init

        public static void init​(String experimentName,
                                String directory,
                                int remoteType)
        Creates a factory for file DAOs.
      • createExperimentRun

        public void createExperimentRun()