Hi
How can I profile a J2EE application? Specifically, I want to be able to see which lines of code in my servlets take the most time to execute.
I have seen people suggest adding logging code to do this, but this is messy (adding code that doesn't need to be there) and time-consuming (if I have to edit all my code just to profile, it might be quicker to make 'educated' guesses as to where the bottlenecks are).
I have also seen people suggest using HTTP-based stress testing to identify bottlenecks; however this will only provide a coarse level of granularity (i.e. it will reveal which pages take a long time---I already know this---I want to see which lines of code are slow).
Ideally I'd prefer to avoid commercial solutions.
Thanks!
How can I profile a J2EE application? Specifically, I want to be able to see which lines of code in my servlets take the most time to execute.
I have seen people suggest adding logging code to do this, but this is messy (adding code that doesn't need to be there) and time-consuming (if I have to edit all my code just to profile, it might be quicker to make 'educated' guesses as to where the bottlenecks are).
I have also seen people suggest using HTTP-based stress testing to identify bottlenecks; however this will only provide a coarse level of granularity (i.e. it will reveal which pages take a long time---I already know this---I want to see which lines of code are slow).
Ideally I'd prefer to avoid commercial solutions.
Thanks!