Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AOP with JSf to profiling methods in application

 
sridhar kosna
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,
My requirement is to calculate the each and every method execution time in application. and it should be generic. could anybody please suggest on this topic.
 
Shasi Mitra
Ranch Hand
Posts: 101
Flex Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go with AroundAdvice if you are using SpringAOP..Otherwise you have to create proxy class for all your classes and do method interposition using Java reflections.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18165
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For practical purposes, however, a good code profiler would be a lot better. And it wouldn't require source code mods or AOP.

When optimizing applications, it's not as important to know how long each method takes to execute as how long the code as a whole takes to execute for the given task and what parts of the code are offending.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic