Ejemplo n.º 1
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();
  }
Ejemplo n.º 2
0
 /**
  * Creates a new ProgressData object recording a snapshot of our progress at this instant
  *
  * @param loc our current position. If null, assumes we are done traversing
  * @param nTotalRecordsProcessed the total number of records we've processed
  * @return
  */
 private ProgressMeterData takeProgressSnapshot(
     final GenomeLoc loc, final long nTotalRecordsProcessed) {
   // null -> end of processing
   final long bpProcessed =
       loc == null ? targetSizeInBP : regionsBeingProcessed.sizeBeforeLoc(loc);
   return new ProgressMeterData(timer.getElapsedTime(), nTotalRecordsProcessed, bpProcessed);
 }