Hi folks! Some of you might know my interdyn + invomon projects [1].
For the others, what are they about? interdyn is a dynamic interceptor binding Extension. It allows to declare a regexp pattern and a class name of an Interceptor annotation. It then applies this annotation to all the classes which map the regexp. Of course you can define multiple rules. rule.1.match=.*ServiceImpl rule.1.interceptor=net.struberg.devtools.cdi.invomon.InvocationMonitored The other part is exactly that @InvocationMonitored interceptor. It logs the most expensive methods and classes after each request. The output looks like the following: 2011-03-19 12:36:27,291 [2046767960@qtp-1243908618-9] INFO invomon.InvocationResultLogger Top Class Invocations: count: 51 net.struberg.myproject.core.be.semester.SemesterRemoteServiceImpl count: 21 net.struberg.myproject.core.be.security.service.SecurityServiceImpl count: 5 net.struberg.myproject.util.be.config.ConfigServiceImpl count: 2 net.struberg.myproject.course.be.CourseServiceImpl count: 1 net.struberg.myproject.events.be.EventServiceImpl count: 1 net.struberg.myproject.core.be.persons.PersonRemoteServiceImpl count: 1 net.struberg.myproject.course.be.LecturerServiceImpl count: 1 net.struberg.myproject.events.be.EventRemoteServiceImpl 2011-03-19 12:36:27,292 [2046767960@qtp-1243908618-9] INFO invomon.InvocationResultLogger Top Method Invocations: dur[ms]: 442.48096 count: 1 net.struberg.myproject.course.be.CourseServiceImpl#deleteCourse dur[ms]: 349.34717 count: 1 net.struberg.myproject.course.be.CourseServiceImpl#getByFilter dur[ms]: 104.53423 count: 1 net.struberg.myproject.events.be.EventRemoteServiceImpl#getEvent dur[ms]: 100.43162 count: 1 net.struberg.myproject.events.be.EventServiceImpl#getEvent dur[ms]: 24.677048 count: 1 net.struberg.myproject.course.be.LecturerServiceImpl#getEmployeeIdsInvolvedInOrgUnitCourses dur[ms]: 1.596834 count: 1 net.struberg.myproject.core.be.persons.PersonRemoteServiceImpl#getByEmployeeIdList dur[ms]: 0.892522 count: 51 net.struberg.myproject.core.be.semester.SemesterRemoteServiceImpl#getCorrespondingSemesterCode dur[ms]: 0.288455 count: 5 net.struberg.myproject.util.be.config.ConfigServiceImpl#getStringProperty dur[ms]: 0.248038 count: 3 net.struberg.myproject.core.be.security.service.SecurityServiceImpl#isGranted dur[ms]: 0.203102 count: 18 net.struberg.myproject.core.be.security.service.SecurityServiceImpl#isAuthenticated The initial version requires an own property file. But of course all this configuration could also be provided via DS-config. wdyt? Worth moving over to DeltaSpike? LieGrue, strub [1] https://github.com/struberg/interdyn
