@Around("execution(* org.oransc.policyagent..*(..)))")
public void executimeTime(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
- MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature();
- String className = methodSignature.getDeclaringType().getSimpleName();
- String methodName = methodSignature.getName();
final StopWatch stopWatch = new StopWatch();
stopWatch.start();
proceedingJoinPoint.proceed();
stopWatch.stop();
+ MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature();
+ String className = methodSignature.getDeclaringType().getSimpleName();
+ String methodName = methodSignature.getName();
logger.trace("Execution time of {}.{}: {} ms", className, methodName, stopWatch.getTotalTimeMillis());
}
@Before("execution(* org.oransc.policyagent..*(..)))")
- public void entryLog(final JoinPoint joinPoint) throws Throwable {
+ public void entryLog(final JoinPoint joinPoint) {
logger.trace("Entering method: {}", joinPoint.getSignature().getName());
}
@After("execution(* org.oransc.policyagent..*(..)))")
- public void exitLog(final JoinPoint joinPoint) throws Throwable {
+ public void exitLog(final JoinPoint joinPoint) {
logger.trace("Exiting method: {}", joinPoint.getSignature().getName());
}