Package ro.isdc.wro.util

Examples of ro.isdc.wro.util.StopWatch.start()


   */
  public synchronized WroModel create() {
    model = new WroModel();
    final StopWatch stopWatch = new StopWatch("Create Wro Model from XML");
    try {
      stopWatch.start("createDocument");
      final Document document = createDocument();
      stopWatch.stop();

      stopWatch.start("processGroups");
      processGroups(document);
View Full Code Here


    try {
      stopWatch.start("createDocument");
      final Document document = createDocument();
      stopWatch.stop();

      stopWatch.start("processGroups");
      processGroups(document);
      stopWatch.stop();

      stopWatch.start("processImports");
      processImports(document);
View Full Code Here

      stopWatch.start("processGroups");
      processGroups(document);
      stopWatch.stop();

      stopWatch.start("processImports");
      processImports(document);
      stopWatch.stop();

      stopWatch.start("createModel");
      parseGroups();
View Full Code Here

      stopWatch.start("processImports");
      processImports(document);
      stopWatch.stop();

      stopWatch.start("createModel");
      parseGroups();
      stopWatch.stop();
      return model;
    } finally {
      // clear the processed imports even when the model creation fails.
View Full Code Here

          return result;
        }
      });
    }
    final StopWatch watch = new StopWatch();
    watch.start("submit tasks");
    executor.submit(tasks);
    watch.stop();
    LOG.debug(watch.prettyPrint());
  }
}
View Full Code Here

  public void submit(final Collection<Callable<T>> callables)
      throws Exception {
    Validate.notNull(callables);

    final StopWatch watch = new StopWatch();
    watch.start("init");
    final long start = System.currentTimeMillis();
    final AtomicLong totalTime = new AtomicLong();
    LOG.debug("running {} tasks", callables.size());

    if (callables.size() == 1) {
View Full Code Here

      onResultAvailable(result);
    } else {
      LOG.debug("Running tasks in parallel");
      watch.stop();

      watch.start("submit tasks");
      for (final Callable<T> callable : callables) {
        getCompletionService().submit(decorate(callable, totalTime));
      }
      watch.stop();
View Full Code Here

      for (final Callable<T> callable : callables) {
        getCompletionService().submit(decorate(callable, totalTime));
      }
      watch.stop();

      watch.start("consume results");
      for (int i = 0; i < callables.size(); i++) {
        doConsumeResult();
      }
    }
    watch.stop();
View Full Code Here

  }

  @Test
  public void test() throws Exception {
    final StopWatch watch = new StopWatch();
    watch.start("load processors");
    final List<ResourcePreProcessor> processors = loadProcessors();
    LOG.debug("found: {} processors", processors.size());
    watch.stop();
    LOG.debug(watch.prettyPrint());
View Full Code Here

      // warm up
      config.setParallelPreprocessing(true);
      victim.processAndMerge(resources, true);

      // parallel
      watch.start("parallel preProcessing");
      config.setParallelPreprocessing(true);
      victim.processAndMerge(resources, true);
      watch.stop();
      final long parallelExecution = watch.getLastTaskTimeMillis();
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.