Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.StopWatch.stop()


    StopWatch timer = new StopWatch();
    timer.start();
    for (int i = 0; i < numIters; i++) {
      mapper.map(src, destClass);
    }
    timer.stop();
    log.info("Total time for additional " + numIters + " mappings: " + timer.getTime() + " milliseconds");
    log.info("avg time for " + numIters + " mappings: " + (timer.getTime() / numIters) + " milliseconds");
  }

}
View Full Code Here


    log.info("Starting "+GuiClient.getApplicationName()+" Ver. "+GuiClient.getVersion());
    runSplash();
    ToolTipManager.sharedInstance().setDismissDelay (300000);
    initialize();
    closeSplash();
    stopWatch.stop();
    log.info(GuiClient.getApplicationName()+" Ver. "+GuiClient.getVersion()+" "+GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"started in ")+DurationFormatUtils.formatDurationWords(stopWatch.getTime(), true, true));
  }
  /**
   * initialization
   */
 
View Full Code Here

        }
        id++;
      }
    } while (moreRows);

    stopWatch.stop();
    LOG.info("Filled indices for region: '" + region.getRegionNameAsString()
      + "' with " + id + " entries in " + stopWatch.toString());
    return newKeys;
  }
View Full Code Here

                } finally {
                    // unget service ref
                    bundleContext.ungetService(metadata.getServiceReference());

                    // update result with information about this run
                    stopWatch.stop();
                    long elapsedTime = stopWatch.getTime();
                    if (resultFromHealthCheck != null) {
                        // wrap the result in an execution result
                        executionResult = new ExecutionResult(metadata, resultFromHealthCheck, elapsedTime);
                    }
View Full Code Here

        final List<HealthCheckMetadata> healthCheckDescriptors = getHealthCheckMetadata(healthCheckReferences);

       
        createResultsForDescriptors(healthCheckDescriptors, results);

        stopWatch.stop();
        if ( logger.isDebugEnabled() ) {
            logger.debug("Time consumed for all checks: {}", msHumanReadable(stopWatch.getTime()));
        }
        // sort result
        Collections.sort(results, new Comparator<HealthCheckExecutionResult>() {
View Full Code Here

  Date endDate = formatter.parse("01/01/2011");
 
  StopWatch stopWatch = new StopWatch();
  stopWatch.start();
  Assert.assertEquals(dao.getTotalNumberOfSalesForPaymentTypeUsingBatch(PaymentType.VISA, startDate, endDate).intValue(), 5448);
  stopWatch.stop();
 
  LOGGER.info("SaleRecordsDAOTest.testGetTotalNumberOfSalesForPaymentTypeUsingBatch - batch fetching took " + stopWatch);
 
    }
   
View Full Code Here

  Date endDate = formatter.parse("01/01/2011");
 
  StopWatch stopWatch = new StopWatch();
  stopWatch.start();
  Assert.assertEquals(dao.getTotalNumberOfSalesForPaymentTypeUsingFethcAll(PaymentType.VISA, startDate, endDate).intValue(), 5448);
  stopWatch.stop();
 
  LOGGER.info("SaleRecordsDAOTest.testGetTotalNumberOfSalesForPaymentTypeUsingFetchAll - batch fetching took " + stopWatch);
 
    }
View Full Code Here

      try {
        if (startKey.length > 0) {
          stopWatch.start();
          table.get(get);
          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        } else {
          stopWatch.start();
          rs = table.getScanner(scan);
          stopWatch.stop();
View Full Code Here

          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        } else {
          stopWatch.start();
          rs = table.getScanner(scan);
          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        }
      } catch (Exception e) {
        sink.publishReadFailure(region, column, e);
      } finally {
View Full Code Here

          // Can't do a get on empty start row so do a Scan of first element if any instead.
          if(startKey.length > 0) {
            get = new Get(startKey);
            stopWatch.start();
            table.get(get);
            stopWatch.stop();
          } else {
            scan = new Scan();
            scan.setCaching(1);
            scan.setMaxResultSize(1L);
            stopWatch.start();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.