Package org.apache.commons.lang.time

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


        sw.stop();
        System.out.println("  Nocache took "+sw);

        long nocachetime = sw.getTime();
       
        sw.reset();
        sw.start();
       
        for( int i = 0; i < 100; i++ )
        {
            WikiPage page = m_engine.getPage( "TestPage" );
View Full Code Here


      System.out.printf("IS WRITEABLE       : %s\n", file.canWrite());
      System.out.printf("SHARE              : %s\n", file.getShare());
      System.out.printf("MODIFICATION DATE  : %s\n", df.format(file.lastModified()));
      sw.stop();
      System.out.printf("DISPLAY DELAY      : %s", sw.getTime());
      sw.reset();
      sw.start();
      System.out.print("\n----------------\n");
    }

  }
View Full Code Here

        System.out.printf("   IN    : %s\n", file.getPath());
        System.out.printf("   OUT   : %s\n", localTargetDirectory + "/" + file.getName());
        System.out.printf("   DELAY : %s\n", sw.getTime());
        System.out.print("----------------\n");
      }
      sw.reset();
    }
  }

  /**
   * Method to upload files
View Full Code Here

        System.out.printf("   IN    : %s\n", file.getPath());
        System.out.printf("   OUT   : %s\n", targetFile.getPath());
        System.out.printf("   DELAY : %s\n", sw.getTime());
        System.out.print("----------------\n");
      }
      sw.reset();
    }

  }
}
View Full Code Here

        sw.stop();
        data.delete(0, data.length());
        data.append(i).append(";").append(sw.getTime()).append("\n");
        fw.write(data.toString());
        fw.flush();
        sw.reset();
      }
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail(e.getMessage());
    } finally {
View Full Code Here

    Get get = null;
    Scan scan = null;
    ResultScanner rs = null;
    StopWatch stopWatch = new StopWatch();
    for (HColumnDescriptor column : tableDesc.getColumnFamilies()) {
      stopWatch.reset();
      startKey = region.getStartKey();
      // 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);
        get.addFamily(column.getName());
View Full Code Here

      byte[] startKey = null;
      Scan scan = null;
      StopWatch stopWatch = new StopWatch();
      // monitor one region on every region server
      for (Map.Entry<String, List<HRegionInfo>> entry : rsAndRMap.entrySet()) {
        stopWatch.reset();
        serverName = entry.getKey();
        // always get the first region
        region = entry.getValue().get(0);
        try {
          tableName = region.getTable().getNameAsString();
View Full Code Here

    Get get = null;
    Scan scan = null;
    ResultScanner rs = null;
    StopWatch stopWatch = new StopWatch();
    for (HColumnDescriptor column : tableDesc.getColumnFamilies()) {
      stopWatch.reset();
      startKey = region.getStartKey();
      // 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);
        get.addFamily(column.getName());
View Full Code Here

      byte[] startKey = null;
      Scan scan = null;
      StopWatch stopWatch = new StopWatch();
      // monitor one region on every region server
      for (Map.Entry<String, List<HRegionInfo>> entry : rsAndRMap.entrySet()) {
        stopWatch.reset();
        serverName = entry.getKey();
        // always get the first region
        region = entry.getValue().get(0);
        try {
          tableName = region.getTable().getNameAsString();
View Full Code Here

        watch.stop();
        System.out.println("[" + ClassUtils.getShortClassName(this.getClass())
                + "#testMassStoreUpdateAutomatic] Time to store "+(actorCount + movieCount)+" m:n objects=" + watch.getTime());
        testPeriod += watch.getTime();

        watch.reset();
        watch.start();
        Query queryMovie = queryMovie(postfix);
        Collection resultMovie = broker.getCollectionByQuery(queryMovie);
        assertEquals(movieCount + 1, resultMovie.size());
        watch.stop();
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.