Esempio n. 1
0
  public void finishLoad() {
    timer.endTimer();
    processFinishTime = timer.getTimeInterval();
    processTime = processFinishTime - processStartTime;

    print("-- Finish %s load", itemsName);
    if (totalDataItems > 0)
      print(
          "** Completed: %,d %s loaded in %,.2f seconds [Rate: %,.2f per second]",
          totalDataItems, itemsName, processTime / 1000.0F, 1000F * totalDataItems / processTime);

    EventManager.send(dataset, new Event(BulkLoader.evFinishBulkload, null));
  }
Esempio n. 2
0
 public void startIndex(String label) {
   currentStartTime = timer.readTimer();
   indexLabel = label;
   currentItems = 0;
   totalIndexItems = 0;
   elapsedLastTime = currentStartTime;
   lastTime = 0;
 }
Esempio n. 3
0
 public void startDataPhase() {
   print("-- Start %s data phase", itemsName);
   dataStartTime = timer.readTimer();
   currentStartTime = dataStartTime;
   elapsedLastTime = dataStartTime;
   currentItems = 0;
   totalDataItems = 0;
   EventManager.send(dataset, new Event(BulkLoader.evStartDataBulkload, null));
 }
Esempio n. 4
0
  public void finishDataPhase() {
    EventManager.send(dataset, new Event(BulkLoader.evFinishDataBulkload, null));
    dataFinishTime = timer.readTimer();
    dataTime = dataFinishTime - dataStartTime;

    print("-- Finish %s data phase", itemsName);
    if (totalDataItems > 0)
      print(
          "%,d %s loaded in %,.2f seconds [Rate: %,.2f per second]",
          totalDataItems, itemsName, dataTime / 1000.0F, 1000F * totalDataItems / dataTime);
  }
Esempio n. 5
0
  public void finishIndex(String label) {
    currentFinishTime = timer.readTimer();
    long indexTime = currentFinishTime - currentStartTime;

    if (totalIndexItems > 0) {
      if (indexTime > 0)
        print(
            "** Index %s: %,d slots indexed in %,.2f seconds [Rate: %,.2f per second]",
            label, totalIndexItems, indexTime / 1000.0F, 1000F * totalIndexItems / indexTime);
      else print("** Index %s: %,d slots indexed", label, totalIndexItems);
    }
  }
Esempio n. 6
0
  final void indexItem() {
    currentItems++;
    totalIndexItems++;

    if (tickPoint(totalIndexItems, indexTickPoint)) {
      long readTimer = timer.readTimer();
      long timePoint = readTimer - currentStartTime;
      ;
      long thisTime = timePoint - lastTime;

      long batchAvgRate = (currentItems * 1000L) / thisTime;
      long runAvgRate = (totalIndexItems * 1000L) / timePoint;

      print(
          "Index %s: %,d slots (Batch: %,d slots/s / Avg: %,d slots/s)",
          indexLabel, totalIndexItems, batchAvgRate, runAvgRate);

      if (tickPoint(totalIndexItems, superTick * indexTickPoint)) elapsed(timer.readTimer());

      currentItems = 0;
      lastTime = timePoint;
    }
  }
Esempio n. 7
0
  public void finishIndexPhase() {
    EventManager.send(dataset, new Event(BulkLoader.evFinishIndexBulkload, null));
    indexFinishTime = timer.readTimer();
    indexTime = indexFinishTime - indexStartTime;

    print("-- Finish %s index phase", itemsName);
    if (totalIndexItems > 0) {
      if (indexTime > 0)
        print(
            "** %,d %s indexed in %,.2f seconds [Rate: %,.2f per second]",
            totalIndexItems, itemsName, indexTime / 1000.0F, 1000F * totalIndexItems / indexTime);
      else print("** %,d %s indexed", totalIndexItems, itemsName);
    }
  }
Esempio n. 8
0
  /** Note when one item (triple, quad) is loaded */
  public final void dataItem() {
    currentItems++;
    totalDataItems++;

    if (tickPoint(totalDataItems, dataTickPoint)) {
      long readTime = timer.readTimer();
      long timePoint = readTime - currentStartTime;
      long thisTime = timePoint - lastTime;

      // *1000L is milli to second conversion

      long batchAvgRate = (currentItems * 1000L) / thisTime;
      long runAvgRate = (totalDataItems * 1000L) / timePoint;
      print(
          "Add: %,d %s (Batch: %,d / Avg: %,d)",
          totalDataItems, itemsName, batchAvgRate, runAvgRate);
      lastTime = timePoint;

      if (tickPoint(totalDataItems, superTick * dataTickPoint)) elapsed(readTime);
      currentItems = 0;
      lastTime = timePoint;
    }
  }
Esempio n. 9
0
 // ---- Overall
 public void startLoad() {
   EventManager.send(dataset, new Event(BulkLoader.evStartBulkload, null));
   timer.startTimer();
   processStartTime = timer.readTimer();
 }
Esempio n. 10
0
 public void startIndexPhase() {
   print("-- Start %s index phase", itemsName);
   indexStartTime = timer.readTimer();
   currentItems = 0;
   EventManager.send(dataset, new Event(BulkLoader.evStartIndexBulkload, null));
 }