Skip to content

Instantly share code, notes, and snippets.

@achyutdev
Created May 4, 2016 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achyutdev/54534a869f28e49fd9636160ad177c13 to your computer and use it in GitHub Desktop.
Save achyutdev/54534a869f28e49fd9636160ad177c13 to your computer and use it in GitHub Desktop.
@Around("execution(* cs544.spring.bank.service.*.*(..))")
public Object invoke(ProceedingJoinPoint call ) throws Throwable {
StopWatch sw = new StopWatch();
sw.start(call.getSignature().getName());
Object retVal = call.proceed();
sw.stop();
long totaltime = sw.getLastTaskTimeMillis();
System.out.println("Time taken :" +totaltime);
return retVal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment