Package org.apache.commons.lang.time

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


    TeraValidate teraValidate = new TeraValidate();
    teraValidate.setConf(controller.getJobConf());
    LOG.info("Starting TeraValidate");
    stopWatch.start();
    teraValidate.run(new String[] { "output", "report" });
    stopWatch.stop();
    LOG.info("TeraValidate took {} ms", stopWatch.getTime());
  }
}
View Full Code Here


                                HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                                "Internal Server Error", null, null, e);
                return;
            }

            stopWatch.stop();
            String timeString = null;
            if (getLogger().isInfoEnabled()) {
                timeString = processTime(stopWatch.getTime());
                getLogger().info("'" + uri + "' " + timeString);
            }
View Full Code Here

    sw.start();
    SmbFile root = new SmbFile(smbURL);
    // Force connection with the share to be established before the first
    // use of the file reference object
    root.connect();
    sw.stop();
    System.out.printf("CONNECTION DELAY   : %s\n", sw.getTime());

    return root;
  }
View Full Code Here

    sw.start();
    SmbFile root = new SmbFile(smbURL, auth);
    // Force connection with the share to be established before the first
    // use of the file reference object
    root.connect();
    sw.stop();
    System.out.printf("CONNECTION DELAY   : %s\n", sw.getTime());

    return root;
  }
View Full Code Here

      System.out.printf("IS HIDDEN          : %s\n", file.isHidden());
      System.out.printf("IS READEABLE       : %s\n", file.canRead());
      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

      InputStream is = file.getInputStream();
      IOUtils.copy(file.getInputStream(), os);
      IOUtils.closeQuietly(os);
      IOUtils.closeQuietly(is);
      // Display timing informations
      sw.stop();
      if (displayInfo) {
        System.out.println("COPY");
        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());
View Full Code Here

      InputStream is = new FileInputStream(file);
      IOUtils.copy(is, os);
      IOUtils.closeQuietly(os);
      IOUtils.closeQuietly(is);
      // Display timing informations
      sw.stop();
      if (displayInfo) {
        System.out.println("COPY");
        System.out.printf("   IN    : %s\n", file.getPath());
        System.out.printf("   OUT   : %s\n", targetFile.getPath());
        System.out.printf("   DELAY : %s\n", sw.getTime());
View Full Code Here

        // Download step
        FileProcessor.downloadFiles(ROOT_DIRECTORY_INPUT, "*.dot", TEMP_DIRECTORY, false);
        // Upload step
        FileProcessor.uploadFiles(TEMP_DIRECTORY, ROOT_DIRECTORY_OUTPUT, false);
        // Collect timing data
        sw.stop();
        data.delete(0, data.length());
        data.append(i).append(";").append(sw.getTime()).append("\n");
        fw.write(data.toString());
        fw.flush();
        sw.reset();
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

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.