主要利用了Spring AOP 技术,对想要统计的方法进行横切处理,方法执行前开始计时,方法执行后停止计时,得到计时方法就是该方法本次消耗时间。步骤:首先编写自己的Interceptor类来实现MethodInterceptor类,来用于切入方法,运行计时代码Spring AOP 的XML配置,配置...
分类:
编程语言 时间:
2014-11-17 13:42:54
阅读次数:
154
测试 代码运行时间linux 中的 中 有个函数可以获取当前时间,精确到 微秒
----> gettimeofday() 1 #include // int gettimeofday(struct timeval *tv,
struct timezone *tz); 2 /***...
分类:
系统相关 时间:
2014-06-06 09:10:48
阅读次数:
248
测试 代码运行时间linux 中的 中 有个函数可以获取当前时间,精确到 微秒
----> gettimeofday() 1 #include // int gettimeofday(struct timeval *tv,
struct timezone *tz); 2 /***...
分类:
系统相关 时间:
2014-06-02 19:08:37
阅读次数:
337