Package org.nutz.lang

Examples of org.nutz.lang.Stopwatch.stop()


        log.error("Error happend during start serivce!", e);
      throw Lang.wrapThrow(e, LoadingException.class);
    }

    // ~ Done ^_^
    sw.stop();
    if (log.isInfoEnabled())
      log.infof("Nutz.Mvc[%s] is up in %sms", config.getAppName(), sw.getDuration());

    return mapping;
View Full Code Here


    Ioc ioc = config.getIoc();
    if (null != ioc)
      ioc.depose();

    // Done, print info
    sw.stop();
    if (log.isInfoEnabled())
      log.infof("Nutz.Mvc[%s] is down in %sms", config.getAppName(), sw.getDuration());
  }

}
View Full Code Here

                log.error("Error happend during start serivce!", e);
            throw Lang.wrapThrow(e, LoadingException.class);
        }

        // ~ Done ^_^
        sw.stop();
        if (log.isInfoEnabled())
            log.infof("Nutz.Mvc[%s] is up in %sms", config.getAppName(), sw.getDuration());

        return mapping;
View Full Code Here

            if (null != ioc)
                ioc.depose();
        }

        // Done, print info
        sw.stop();
        if (log.isInfoEnabled())
            log.infof("Nutz.Mvc[%s] is down in %sms", config.getAppName(), sw.getDuration());
    }

}
View Full Code Here

      chain.doChain();
      return;
    }
    Stopwatch stopwatch = Stopwatch.begin();
    chain.doChain();
    stopwatch.stop();
    LOG.debugf("ExecutionTime %dms in %s",stopwatch.getDuration(),chain.getCallingMethod());
  }

}
View Full Code Here

  }

  public static void dao(Dao dao, List<Pojo> list){
    Stopwatch sw = Stopwatch.begin();
    dao.fastInsert(list);
    sw.stop();
    System.out.printf("Dao 批量插入%d条,耗时%dms\n",num,sw.getDuration());
  }
 
  public static void jdbc(DataSource ds, List<Pojo> list) throws Throwable{
   
View Full Code Here

    }
    ps.executeBatch();
    conn.commit();
    conn.close();
   
    sw.stop();
    System.out.printf("JDBC 批量插入%d条,耗时%dms\n",num,sw.getDuration());
  }
}
View Full Code Here

        nutzJson(10000);
        fastJson(10000);
       
        Stopwatch sw = Stopwatch.begin();
        nutzJson(50*10000);
        sw.stop();
        System.out.println("Nutz-Json 50w次耗时: " + sw.getDuration());
       
        sw.start();
        fastJson(50*10000);
        System.out.println("Fast-Json 50w次耗时: " + sw.getDuration());
View Full Code Here

        System.out.println("Fast-Json 50w次耗时: " + sw.getDuration());
       
        //-------------------------------------------------------------------
        sw.start();
        nutzJson(50*10000);
        sw.stop();
        System.out.println("Nutz-Json 50w次耗时: " + sw.getDuration());
       
        sw.start();
        fastJson(50*10000);
        sw.stop();
View Full Code Here

        sw.stop();
        System.out.println("Nutz-Json 50w次耗时: " + sw.getDuration());
       
        sw.start();
        fastJson(50*10000);
        sw.stop();
        System.out.println("Fast-Json 50w次耗时: " + sw.getDuration());
    }
   
    public void nutzJson(int time) {
        JsonObject obj = new JsonObject();
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.