This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't think that information is directly available. However, most popular logging systems have some sort of option to log timestamps on entry and exit from a method. Or, if you're really ambitious, you could instrument the action methods using AOP. In my case, that would be relatively easy, since I like to prefix the action method names with "do", but your mileage may vary.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 24, 2010
Thanks for the reply Tim.
Yes, the logging system do facilitate by appending the method name but if I am not writing any loggers in a particular method then it won't show anything.
When you say instrument the action methods using AOP, what i understand is as follows:
get an entry in the web.xml for referring the SpringContext.xml.
declare bean definition for the managed bean and refer them using the ids in the jsf.
but here also, how do i get the action method name?
it just clicked me while writing my understanding above, is it by any chance possible to get it using java reflection?
I really doubt there's anything you can do in a purely JSF mode to get these metrics, short of customizing the source code that fires the action methods. Although, come to think of it, there MAY be pre-/post- logging code in JSF you can turn on.
Overall, though, you're probably better off using a code profiling tool.
And of course, if you're attempting to optimize before the fact, the old rule applies that you should never optimize until a need is demonstrated. Frequently it will cost you more resources than the "optimization" saves you over the life of the system.