1 2 3 4 5 6 7 8 9 10 11 12 13 14
| @Aspect public class PerformanceApp {
@Around("call(* com.benben.starttest.MainActivity.**(..))") public void getTime(ProceedingJoinPoint joinPoint) { long start = System.currentTimeMillis(); try { joinPoint.proceed(); } catch (Throwable throwable) { throwable.printStackTrace(); } Log.e("time","cost: " + (System.currentTimeMillis() - start)); } }
|