常规方式
手动在方法前后埋点
long time=System.currentTimeMillis();
long cost=System.currentTimeMillis()-time;
侵入性强
工作量大
AOP
AOP介绍
Aspect Oriented Programming ,面向切面编程
针对同一类问题的统一处理
无侵入添加代码
手动在方法前后埋点
long time=System.currentTimeMillis();
long cost=System.currentTimeMillis()-time;
侵入性强
工作量大
Aspect Oriented Programming ,面向切面编程
针对同一类问题的统一处理
无侵入添加代码