views:

877

answers:

6

I'm looking to monitor the end user experience of our website and link that with timing information already logged on the server side. My assumption is that this will require javascript to to capture time stamps at the start of request (window.onbeforeunload) and at the end of loading (window.onload). Basically this - "Measuring Web application response time: Meet the client"

1/ Is there a better approach? 2/ What kind of performance penalty should I be expecting (order of magnitude)? 3/ How good are the results?

-Kam

+1  A: 

We have a "call back" (a 1x1 transparent GIF image with a parameter representing the ID for the page render) in the page that logs a "Page viewed" to our database. That is records with the same ID that the page itself is recorded, and we have a log entry when our rendering finishes.

So we have time of:

  • Page preparation started
  • Page preparation / Response finished
  • Client phoned-home when rendering completed

Helps with understanding clients that are "slow" (CPU or ISP/bandwidth)

P.S. Page renders that do not call home are of interest too - the user clicked-off (assuming that other page renders in that session did record a Phone Home)

Kristen
I'm a bit unclear how you have request start. Is that tracked based on the server time stamp? I'm also unsure how you distinguish between rendering finishing and when the image is requested. Don't browsers fetch images before the page finishes rendering?-Kam
Kam
There's also an element of depending on load ordering, I believe multiple browsers now look forward through the document to find resource like things in advance -- i'm not sure whether they only load specific resource types though.
olliej
Sorry, I wasn't very clear.The first two are the time our serverside application starts, and finishes, preparing the page. The Phone Home is when the client browser loads our fake image. Yes its subjective as to whether rendering is complete, we use the OnLoad event. I'll edit my text
Kristen
+4  A: 

What about utilizing something like yslow ( a firefox extension)?

GregD
In this case I'm interested in the experience of users in production. My goal is to know system wide performance instead of just single test runs. yslow gave us some great suggestions, its just not a monitoring solution.
Kam
A: 

I'm pretty dubious of these methods. Some of these methods are more complex than necessary and I question the accuracy of this data. What I'd do is have testers go to various networks and use something like Firebug or something:

http://getfirebug.com/

For the heck of it; here is an interesting paper recently submitted to SOSP on a tool called AjaxScope. Interestingly enough, it is a scholarly article, presented by MS Research, that shows Firefox's Javascript implementation performing many times better than Internet Explorer in a few cases. :)

http://research.microsoft.com/en-us/groups/rad/sosp07.pdf

BobbyShaftoe
I don't disagree w/r to complexity, but we log this data on Live sites too, and then report on how it varies over time (rather than just spot checks). This shows up pages that have slowed down (e.g. database needs optimising)
Kristen
@Kristen: Yeah, it might work. I'm just a little uneasy about it. :) You might be interested in a paper recently submitted to SOSP on AjaxScope by MS Research. http://research.microsoft.com/en-us/groups/rad/sosp07.pdf
BobbyShaftoe
+1  A: 

We use Jiffy.

It's very simple to use and modify - we wrote our own server-side code (instead of Jiffy's Apache + perl) and used Jiffy's JS.

Regarding a performance penalty - there isn't one on the client side. The JS itself is trivially fast, and the reporting back to the server can be done with an XHR after page load, which affects nothing in the user experience. On the server side you'll get twice as many requests. If that's a bottleneck, you could set up a different server just for the timing responses.

orip
A: 

We tend to use a combination of:

Firefox: Web Developer Toolbar Firebug YSlow

IE: Fiddler

out of all of these, I've found YSlow gives the best information on what you can do to improve your load times, but Fiddler gives the best overall information on what you can expect over the wire, and can even simulate different network speeds.

Terry_Brown
A: 

An alternative to Jiffy is Episodes.

Both involve instrumenting your Javascript to keep track of various timings, and logging those timings on a central server.

Pete TerMaat