Package org.springframework.util

Examples of org.springframework.util.StopWatch.stop()


      watch = new StopWatch();
      watch.start();
    }   
    threadPool.execute(task);
   
    if (log.isDebug()) watch.stop();
    if (log.isDebug()) log.debug("Current size of queue is: "+queue.size()+". Running last task took (ms): "+watch.getTotalTimeMillis());
  }

  public void shutDown() {
    // Initiates orderly shutdown and don't accept creation of new threads
View Full Code Here


    } else {
      retValue = ReflectionUtils.invokeMethod(method, bean, arguments);
    }

    if (logger.isDebugEnabled()) {
      sw.stop();
      List<String> argsDescr = new ArrayList<String>(arguments.length);
      for (int i = 0; i < arguments.length; i++) {
        if (arguments[i] != null && arguments[i] instanceof String) {
          argsDescr.add((String) arguments[i]);
        } else {
View Full Code Here

      sw.start(name);
      try {
        return invocation.proceed();
      }
      finally {
        sw.stop();

        System.out.println(sw.shortSummary());
      }
    }
  }
View Full Code Here

      sw.start(name);
      try {
        return invocation.proceed();
      }
      finally {
        sw.stop();

        System.out.println(sw.shortSummary());
      }
    }
View Full Code Here

        for (int i=0; i<100; i++) {
            StopWatch sw = new StopWatch();
            sw.start();
            template.generate(model);
            sw.stop();
            sum += sw.getTotalTimeMillis();
        }

        System.out.println("took average of " + ((double)sum)/100 + " millis");
View Full Code Here

      sw.start("invoke");
      try {
        return invocation.proceed();
      }
      finally {
        sw.stop();
        synchronized (this) {
          this.callCount++;
          this.accumulatedCallTime += sw.getTotalTimeMillis();
        }
      }
View Full Code Here

            for (int i = 0; i < nrOfCalls; i++) {
                contacts = remoteContactManager.getAll();
            }

            stopWatch.stop();

            if (contacts.size() != 0) {
                for(Contact contact : contacts) {
                    System.out.println("Contact: " + contact);
                }
View Full Code Here

                reg.getAllPrincipals();
                fail("Expected AuthenticationCredentialsNotFoundException");
            } catch (AuthenticationCredentialsNotFoundException expected) {
            }
        }
        sw.stop();
//        assertTrue(sw.getTotalTimeMillis() < 1000);

    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
View Full Code Here

            session.setAttribute(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY, SecurityContextHolder.getContext());
            SecurityContextHolder.clearContext();
            sw.start(Integer.toString(nAuthorities) + " authorities");
            runWithStack(minimalStack);
            System.out.println(sw.shortSummary());
            sw.stop();
        }
        System.out.println(sw.prettyPrint());
    }

    private List<GrantedAuthority> createRoles(int howMany) {
View Full Code Here

     
      GridNode node = Grid.startGridNode();
     
      log.info("GridNode ID : " + node.getId());
     
      sw.stop();

      log.info("GridNode Started Up. [" + sw.getLastTaskTimeMillis() + " ms]");
     
      // Submit Job
      log.debug("Reading NAR");
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.