Esempio n. 1
0
  public static void runAllnoMigrate(SqlEngine tcd, SqlDb d, Peer p) throws Exception {

    //		for(int k = 100; k <= 1000; k*=10){
    int k = 2000;
    //		for(int l = k/10; l <= k/3; l+=k/10){
    //		for(int l = k/10; l <= k/2; l+=k/5){
    for (int l = 7 * k / 10; l < k; l += k / 5) {
      Config.setWorkloadPrefix(Config.getTestSchemaName() + "-" + k + "i" + l + "d");

      System.out.println("================");
      System.out.println("SCHEMA: " + Config.getWorkloadPrefix());
      System.out.println("#INSERTIONS: " + k);
      System.out.println("#DELETIONS: " + l);
      System.out.println("================");

      System.out.println("EXP: NON-INCREMENTAL");
      SqlEngine.insTimes = new ArrayList<Long>();
      SqlEngine.delTimes = new ArrayList<Long>();
      runNonIncremental(tcd, p, 3);
      calcAvgTimes();

      System.out.println("EXP: INCREMENTAL");
      SqlEngine.insTimes = new ArrayList<Long>();
      SqlEngine.delTimes = new ArrayList<Long>();
      runIncremental(tcd, p, 3);
      calcAvgTimes();
    }
    //		}

    System.out.println("================");
    System.out.println("DRED EXPERIMENT");
    System.out.println("================");

    tcd.clean();
    Config.setStratified(false);

    createDatabase(Config.getTestSchemaName(), d);
    tcd.migrate();

    //		for(int l = k/10; l <= k/2; l+=k/5){
    for (int l = k / 10; l <= k / 2; l += k / 5) {

      Config.setWorkloadPrefix(Config.getTestSchemaName() + "-" + k + "i" + l + "d");

      System.out.println("================");
      System.out.println("SCHEMA: " + Config.getWorkloadPrefix());
      System.out.println("#INSERTIONS: " + k);
      System.out.println("#DELETIONS: " + l);
      System.out.println("================");

      System.out.println("EXP: DRed");

      SqlEngine.insTimes = new ArrayList<Long>();
      SqlEngine.delTimes = new ArrayList<Long>();
      runIncremental(tcd, p, 3);
      calcAvgTimes();
    }

    tcd.clean();
  }
Esempio n. 2
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();
  }
Esempio n. 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();
  }
Esempio n. 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();
  }
Esempio n. 5
0
  public static void runAllmigrateEveryTime(
      OrchestraSystem system, SqlEngine tcd, SqlDb d, List<String> tables) throws Exception {
    tcd.cleanKeepConn();

    Peer p = system.getPeers().iterator().next();
    //		int k = 10; int l = 1;
    for (int k = 1000; k <= 10000; k *= 10) {
      for (int l = k / 10; l <= k / 2; l += k / 10) {
        Config.setWorkloadPrefix(Config.getTestSchemaName() + "-" + k + "i" + l + "d");

        System.out.println("================");
        System.out.println("SCHEMA: " + Config.getWorkloadPrefix());
        System.out.println("================");

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

        setupDb(system, d, tcd, tables);
        runNonIncremental(tcd, p, 5);

        //				for(int m = 0; m < 5; m++){
        //				setupDb(system, d, tcd, tables);
        //				runNonIncremental(tcd, 1);
        //				tcd.cleanKeepConn();
        //				}
        calcAvgTimes();
        tcd.cleanKeepConn();

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

        for (int m = 0; m < 5; m++) {
          setupDb(system, d, tcd, tables);
          runIncremental(tcd, p, 1);
          tcd.cleanKeepConn();
        }
        calcAvgTimes();
      }
    }
  }
Esempio n. 6
0
  public static void runAllnoMigrateInsOnly(SqlEngine tcd, Peer p) throws Exception {

    int k = 1000;
    int l = 100;
    Config.setWorkloadPrefix(Config.getTestSchemaName() + "-" + k + "i" + l + "d");

    System.out.println("================");
    System.out.println("SCHEMA: " + Config.getWorkloadPrefix());
    System.out.println("#INSERTIONS: " + k);
    System.out.println("#DELETIONS: " + l);
    System.out.println("================");

    // The delete option was removed
    // Config.setDelete(false);
    System.out.println("EXP: INSERTIONS ONLY");
    SqlEngine.insTimes = new ArrayList<Long>();
    SqlEngine.delTimes = new ArrayList<Long>();
    runIncremental(tcd, p, 5);
    calcAvgTimes();

    tcd.clean();
  }