Package org.springframework.util

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


    InteractiveCommandUtils.printReloadInfo(rootName, rootName, watch);
  }
 
  void reloadModule(String moduleToReload, CommandState commandState) {
    StopWatch watch = new StopWatch();
    watch.start();
    String actualModule = null;

    if (!Impala.reload(moduleToReload)) {
      actualModule = Impala.reloadLike(moduleToReload);
    } else {
View Full Code Here


    String name = invocation.getMethod().getDeclaringClass().getName() + "." + invocation.getMethod().getName();
    StopWatch stopWatch = new StopWatch(name);
    Object returnValue = null;
    boolean exitThroughException = false;
    try {
      stopWatch.start(name);
      writeToLog(logger,
          replacePlaceholders(this.enterMessage, invocation, null, null, -1));
      returnValue = invocation.proceed();
      return returnValue;
    }
View Full Code Here

    }
  }

  void reloadRootModule() {
    StopWatch watch = new StopWatch();
    watch.start();
    Impala.reloadRootModule();
    watch.stop();
    String rootName = Impala.getRootModuleDefinition().getName();
    InteractiveCommandUtils.printReloadInfo(rootName, rootName, watch);
  }
View Full Code Here

    InteractiveCommandUtils.printReloadInfo(rootName, rootName, watch);
  }
 
  void reloadModule(String moduleToReload, CommandState commandState) {
    StopWatch watch = new StopWatch();
    watch.start();
    String actualModule = null;

    if (!Impala.reload(moduleToReload)) {
      actualModule = Impala.reloadLike(moduleToReload);
    } else {
View Full Code Here

  @Override
  protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable {
    String name = createInvocationTraceName(invocation);
    StopWatch stopWatch = new StopWatch(name);
    stopWatch.start(name);
    try {
      return invocation.proceed();
    }
    finally {
      stopWatch.stop();
View Full Code Here

    Boolean result = true;
    /**!
     * 首先是apache的exp,看看效率如何
     */
    final StopWatch clock = new StopWatch("Performance");
    clock.start("jexl2");
    for(int i=0;i<count;i++){
      Configuration conf = new Configuration();
      ExpressionParser exprParser = new ExpressionParser( test, beans, conf );
          Expression testExpr = exprParser.parse();
          try {
View Full Code Here

    clock.stop();
//        System.out.println(clock.prettyPrint());
        /**!
         * 其次是MVEL,看看效率如何
         */
        clock.start("MVEL");
        for(int i=0;i<count;i++){
          result = (Boolean)ScriptEvaluator.evalWithMVEL(test.substring(2, test.length()-1),beans);
        }
        clock.stop();
        System.out.println(clock.prettyPrint());
View Full Code Here

    String name = invocation.getMethod().getDeclaringClass().getName() + "." + invocation.getMethod().getName();
    StopWatch stopWatch = new StopWatch(name);
    Object returnValue = null;
    boolean exitThroughException = false;
    try {
      stopWatch.start(name);
      writeToLog(logger,
          replacePlaceholders(this.enterMessage, invocation, null, null, -1));
      returnValue = invocation.proceed();
      return returnValue;
    }
View Full Code Here

  @Override
  public Object invoke(final MethodInvocation arg0) throws Throwable {
       final StopWatch clock = new StopWatch(
               "Profiling for '" + arg0.getClass().getName() + "' and '" + arg0.getArguments() + "'");
         try {
            clock.start(arg0.getMethod().getName());
            return arg0.proceed();
         } finally {
            clock.stop();
            LOG.info(clock.prettyPrint());
         }   
View Full Code Here

   
  public Object profile(final ProceedingJoinPoint call) throws Throwable {
        final StopWatch clock = new StopWatch(call.toLongString());
        String argValue = null;
        try {
           clock.start(call.toShortString());
           return call.proceed();
        } finally {
           clock.stop();
           StringBuffer sb = new StringBuffer();
           sb.append("\n");
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.