Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging the time it takes for a page to load

 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web application written in Struts and I want to log the time that it takes for each page in my app to load. Is there an easy way to do this? Are there tools or libraries available for this? If none, what solutions can you recommend that I can use to achieve this?

Thanks for your inputs,

Eugene
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about the time it takes the server to respond to a request (server-side profiling) or the time it takes for a browser to receive the download (client-side profiling) These are two different metrics.
For server-side profiling, I've heard good things about JAMon.
For client-side profiling, I've used The Grinder many times.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do your own logging at the action level and this is pretty easy to throw in if you are using a common base action class. This tells you most of what you want to know as far as server-side processing goes. This timing would not include JSP processing (including processing done with custom tags) and does not include the minor overhead that Struts adds in. Your application server might be able to provide higher level timing that includes all server-side processing.

True end user experience is a little tougher to measure and to some extent you need to figure out what is important to measure. Measuring performance under various loads can also get involved. Also, if you are just kicking statistics out to a log file, you need to do some processing of the log file to produce meaningful statistics. There are various commercial tools designed to do this type of stuff.

Joe: Thanks for the JAMon link...I might check into that.

- Brent
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,

Thanks for the links! I was looking for client-side profiling. I will try this out. Anyway, thanks for all your inputs.

Eugene
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic