Skip to content

taabishm2/aspect-timing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Execution Timing using AspectJ

Measure and log execution time of annotated methods in a Spring app using AspectJ Note: Spring AOP is a proxy-based and cannot capture calls to private methods or calls made within a class

Usage

  1. Add TimingAspectConfig.java and TimeIt.java to project
  2. Add aspectjweaver dependency to pom.xml
    <dependency>
    	<groupId>org.aspectj</groupId>
    	<artifactId>aspectjweaver</artifactId>
    	<version>${aspectj.version}</version>
    </dependency>
  3. Add @EnableAspectJAutoProxy to configuration class
  4. Add annotation @TimeIt over methods which are to be timed
  5. Check log4j logs to see timings

About

Time execution time of methods using AspectJ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages