Package org.jamesii.perfdb.entities

Examples of org.jamesii.perfdb.entities.IRuntimeConfiguration


      return;
    }

    SelectionTree selectionTree =
        selectionHook.getSelectionTree(crti.getComputationTaskID());
    IRuntimeConfiguration rtConfig = registerRuntimeConfig(selectionTree);
    if (rtConfig == null) {
      SimSystem
          .report(Level.WARNING,
              "Could not record performance, runtime configuration could not be resolved.");
      return;
View Full Code Here


   *           if look up/de-serialisation went wrong
   */
  protected IRuntimeConfiguration registerRuntimeConfig(
      SelectionTree selectionTree) {

    IRuntimeConfiguration rtConf = null;
    try {

      rtConf = perfDatabase.newRuntimeConfiguration(selectionTree, false);

      // If the registered runtime configuration belongs to those that
      // are affected by an algorithmic change, tell the performance
      // database to create a new version, and remove the ID from the set (so
      // that this does not happen multiple times)
      if (newVerRTConfigIDs.contains(rtConf.getID())) {
        rtConf = perfDatabase.newRuntimeConfiguration(selectionTree, true);
        newVerRTConfigIDs.remove(rtConf.getID());
      }

    } catch (ConstraintException ex) {
      SimSystem.report(Level.SEVERE, null,
          CONSTR_ERR_MSG_TITLE + ex.getMessage(), null, ex);
View Full Code Here

   *          the problem instance
   * @return the runtime configuration
   */
  public IRuntimeConfiguration storeConfigurationForProblem(
      SelectionTree selectionTree, IProblemInstance problemInstance) {
    IRuntimeConfiguration rtConfig = registerRuntimeConfig(selectionTree);
    flushIfNecessary();
    return rtConfig;
  }
View Full Code Here

   *          the id
   * @throws SQLException
   *           the SQL exception
   */
  public RuntimeConfiguration(long id) throws SQLException {
    IRuntimeConfiguration rtc = this.getEntity(id);
    setSelectionTree(rtc.getSelectionTree());
    setID(id);
  }
View Full Code Here

   *           if look-up failed
   */
  public IRuntimeConfiguration lookUp(SelectionTree selTree)
      throws SQLException {

    IRuntimeConfiguration returnConfig = null;
    List<IRuntimeConfiguration> rtConfigs =
        Generics.changeListType(getEntities("selection_hash='"
            + selTree.getHash() + "'"));

    // Check back: equivalent hash code is not sufficient!
View Full Code Here

      Map<String, IRuntimeConfiguration> configMap, List<String> configDescs) {

    Map<String, Double[]> configPerfDataForSummary = new HashMap<>();
    StringBuilder perfDataStrB = new StringBuilder();
    for (String configDesc : configDescs) {
      IRuntimeConfiguration rtConfig = configMap.get(configDesc);
      List<IApplication> apps =
          getPerfDB().getAllApplications(problem, rtConfig);
      SimSystem.report(Level.INFO, "Found " + apps.size() + " replications.");

      if (apps.size() < getMinReplications()) {
View Full Code Here

      Map<String, IRuntimeConfiguration> configMap) {
    Map<String, List<Pair<String, Double[]>>> splitPData = new HashMap<>();

    for (Entry<String, Double[]> configDesc : configPerfDataForSummary
        .entrySet()) {
      IRuntimeConfiguration rtConfig = configMap.get(configDesc.getKey());
      String topmostFacName = getTopmostSummaryFactoryName(rtConfig);
      if (!splitPData.containsKey(topmostFacName)) {
        splitPData.put(topmostFacName, new ArrayList<Pair<String, Double[]>>());
      }
      splitPData.get(topmostFacName).add(
View Full Code Here

      }
    }

    for (Entry<IRuntimeConfiguration, List<IApplication>> rtEntry : rtMap
        .entrySet()) {
      IRuntimeConfiguration config = rtEntry.getKey();
      if (!perfMap.containsKey(config)) {
        SimSystem.report(Level.INFO, "Config '" + config
            + "' was not executed for all problems - will be ignored.");
      }
View Full Code Here

  }

  @Override
  public IRuntimeConfiguration newRuntimeConfiguration(
      SelectionTree selectionTree, boolean newVersion) {
    IRuntimeConfiguration rtConf = getRuntimeConfig(selectionTree);

    // Create configuration if there is none
    if (rtConf == null) {
      rtConf =
          new RuntimeConfiguration(selectionTree, Calendar.getInstance()
              .getTime(), 1);
      save(rtConf);
      return rtConf;
    }

    // Otherwise return current configuration...
    if (!newVersion) {
      return rtConf;
    }

    // ... or go to the next version
    int version = rtConf.getVersion() + 1;
    ((RuntimeConfiguration) rtConf).markOutdated();
    IRuntimeConfiguration newRTConfig =
        new RuntimeConfiguration(selectionTree, Calendar.getInstance()
            .getTime(), version);
    save(rtConf);
    save(newRTConfig);
    return newRTConfig;
View Full Code Here

    IProblemInstance problemInstance =
        perfDB.newProblemInstance(problemDefinition, 123L, SimSystem
            .getRNGGenerator().getRNGFactory().getFactoryInstance().getClass()
            .getName());
    SelectionTree selectionTree = new SelectionTree(null);
    IRuntimeConfiguration runtimeConfiguration =
        perfDB.newRuntimeConfiguration(selectionTree, false);
    perfDB.newRuntimeConfiguration(selectionTree, false);

    IHardwareSetup hardwareSetup = perfDB.getAllHardwareSetups().get(0);
    perfDB.newApplication(problemInstance, runtimeConfiguration, hardwareSetup,
View Full Code Here

TOP

Related Classes of org.jamesii.perfdb.entities.IRuntimeConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.