예제 #1
0
  /**
   * Start up the progress meter, printing initialization message and starting up the daemon thread
   * for periodic printing.
   */
  @Requires("progressMeterDaemon != null")
  private synchronized void start() {
    timer.start();
    lastProgressPrintTime = timer.currentTime();

    logger.info("[INITIALIZATION COMPLETE; STARTING PROCESSING]");
    logger.info(
        String.format(
            "%15s processed.%s  runtime per.1M.%s completed total.runtime remaining",
            "Location", processingUnitName, processingUnitName));

    progressMeterDaemon.start();
  }
예제 #2
0
  /** Should be called when processing is done */
  public void notifyDone(final long nTotalRecordsProcessed) {
    // print out the progress meter
    this.nTotalRecordsProcessed = nTotalRecordsProcessed;
    this.positionMessage = "done";
    printProgress(true);

    logger.info(
        String.format(
            "Total runtime %.2f secs, %.2f min, %.2f hours",
            timer.getElapsedTime(), timer.getElapsedTime() / 60, timer.getElapsedTime() / 3600));

    if (performanceLog != null) performanceLog.close();

    // shutdown our daemon thread
    progressMeterDaemon.done();
  }