コード例 #1
0
  public static void runScalability(SqlEngine tcd, SqlDb d, Peer p) throws Exception {
    //		Config.FULL_TEST_NAME = Config.TEST_SCHEMA_NAME + "-10000i0d";
    Config.setWorkloadPrefix(Config.getTestSchemaName() + "-10i0d");

    // The insert and delete options were removed.
    // Config.setInsert(true);
    // Config.setDelete(false);
    Config.setNonIncremental(false);

    tcd.importUpdates(new FileDb(Config.getWorkloadPrefix(), Config.getImportExtension()));

    tcd.mapUpdates(recno, recno++, p, true);

    d.resetCounters();
    tcd.commit();
    d.resetConnections();

    // The delete option was removed.
    // Config.setDelete(true);

    runScalabilityInsDel(tcd, d, p, 1, 1);
    //		runScalabilityInsDel(tcd, d, 10, 10);
    //		runScalabilityInsDel(tcd, d, 100, 100);
    //		runScalabilityInsDel(tcd, d, 500, 500);
    //		runScalabilityInsDel(tcd, d, 1000, 1000);

    tcd.clean();
  }
コード例 #2
0
  public static void run(SqlEngine tcd, Peer p, int n) throws Exception {
    for (int j = 0; j < n; j++) {
      tcd.computeDeltaRules();

      tcd.importUpdates(new FileDb(Config.getWorkloadPrefix(), Config.getImportExtension()));

      tcd.mapUpdates(recno, ++recno, p, true);

      if (Config.getReset()) tcd.reset();
    }
  }
コード例 #3
0
  public static void runScalability1(SqlEngine tcd, SqlDb d, Peer p) throws Exception {
    Config.setWorkloadPrefix(Config.getTestSchemaName() + "-10000i0d");
    // The insert and delete options were removed.
    // Config.setInsert(true);
    // Config.setDelete(false);
    Config.setNonIncremental(false);

    tcd.importUpdates(new FileDb(Config.getWorkloadPrefix(), Config.getImportExtension()));

    tcd.mapUpdates(recno, ++recno, p, true);

    d.resetCounters();
    tcd.commit();
    d.resetConnections();
  }
コード例 #4
0
  public static void runScalabilityInsDel(SqlEngine tcd, SqlDb d, Peer p, int ins, int del)
      throws Exception {
    Config.setWorkloadPrefix(Config.getTestSchemaName() + "-" + ins + "i" + del + "d");

    SqlEngine.insTimes = new ArrayList<Long>();
    SqlEngine.delTimes = new ArrayList<Long>();

    for (int i = 0; i < 2; i++) {
      tcd.computeDeltaRules();

      tcd.importUpdates(new FileDb(Config.getWorkloadPrefix(), Config.getImportExtension()));

      tcd.mapUpdates(recno, ++recno, p, false);

      d.resetCounters();
      tcd.commit();
      d.resetConnections();
    }
    //		calcAvgTimes();
  }