Package org.jamesii.perfdb

Examples of org.jamesii.perfdb.IPerformanceDatabase


   *          the arguments (unused)
   */
  public static void main(String[] args) {

    try {
      IPerformanceDatabase perfDB = SimSpExPerspective.getPerformanceDataBase();
      perfDB.open();

      List<IProblemDefinition> problems = perfDB.getAllProblemDefinitions();
      List<IRuntimeConfiguration> configs = null;
      SimSystem.report(Level.INFO, "#problems:" + problems.size());
      for (IProblemDefinition problem : problems) {
        if (configs == null) {
          configs = perfDB.getAllRuntimeConfigs(problem);
        } else {
          configs.addAll(perfDB.getAllRuntimeConfigs(problem));
        }
      }

      SimSystem.report(Level.INFO, "#configs:" + configs.size());
      int counter = 0;
View Full Code Here


   *          problem definition that shall be instanced
   */
  protected void init(IProblemDefinition problemDefinition) {

    // Get problem instances
    IPerformanceDatabase perfDB = SimSpExPerspective.getPerformanceDataBase();
    List<IProblemInstance> instances = null;
    try {
      instances = perfDB.getAllProblemInstances(problemDefinition);
    } catch (Exception ex) {
      SimSystem.report(Level.SEVERE, null,
          "PerfDB Lookup failed:" + ex.getMessage(), null, ex);
    }

View Full Code Here

   * Start extraction.
   */
  protected void startExtraction() {
    SimSystem.report(Level.INFO, "Starting extraction...");
    try {
      IPerformanceDatabase perfDB = SimSpExPerspective.getPerformanceDataBase();
      perfDB.open();
      FeatureExtraction fExtraction = new FeatureExtraction(perfDB);
      FeatureExtraction.refreshFeatureExtractors(perfDB);
      fExtraction.extractFeatures();
    } catch (Exception ex) {
      SimSystem.report(Level.SEVERE, null, ex.getMessage(), null, ex);
View Full Code Here

   *          the connection data
   * @return the performance database, or null if there is a problem
   */
  public static IPerformanceDatabase createDefaultPerformanceDatabase(
      DBConnectionData connectionData) {
    IPerformanceDatabase performanceDatabase = null;
    try {
      performanceDatabase =
          SimSystem
              .getRegistry()
              .getFactory(AbstractPerfDBFactory.class, null)
              .create(
                  new ParameterBlock(connectionData,
                      PerfDBFactory.CONNECTION_DATA), SimSystem.getRegistry().createContext());

      performanceDatabase.open();

      // This is necessary in case the Hibernate driver removes all
      // 'competing' loggers, as the one from HSQLDB does
      ApplicationLogger.reattachLogger();
    } catch (Exception ex) {
View Full Code Here

            JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION) {
      return;
    }

    try {
      IPerformanceDatabase perfDB = SimSpExPerspective.getPerformanceDataBase();
      perfDB.clear();
    } catch (Exception ex) {
      SimSystem.report(Level.SEVERE, "Error while clearing the database", ex);
    }

    SimSystem.report(Level.INFO, "The performance database has been cleared.");
View Full Code Here

  @Override
  public void setUp() {
    SimSpExPerspective.setDbConnectionData(dbConn);
    SimSpExPerspective.resetPerformanceDatabase();
    IPerformanceDatabase perfDatabase =
        SimSpExPerspective.getPerformanceDataBase();
    perfDatabase.clear();
    ApplicationLogger.enableConsoleLog();
    numberOfRTConfigs = null;
  }
View Full Code Here

public class HibernatePerfDBTest extends PerfDBTest {

  @Override
  public IPerformanceDatabase getDataBase(DBConnectionData dbConn)
      throws Exception {
    IPerformanceDatabase perfDB = (new HibernatePerfDBFactory())
        .create(new ParameterBlock(dbConn,
            PerfDBFactory.CONNECTION_DATA), SimSystem.getRegistry().createContext());
    perfDB.open();
    return perfDB;
  }
View Full Code Here

TOP

Related Classes of org.jamesii.perfdb.IPerformanceDatabase

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.