YahooArchive / boomerang

End user oriented web performance testing and beaconing
http://lognormal.github.com/boomerang/doc/
Other
1.18k stars 448 forks source link

Support for t_page and t_rest with an extension of start_timer #12

Closed hanoii closed 13 years ago

hanoii commented 13 years ago

I have worked on a tiny addition for filling in t_page and t_resp. Basically I know what we need is a timestamp of the first byte received before anything is loaded, and that should be outside boomerang namespace. I checked http://developer.yahoo.net/forum/?showtopic=6340&st=0&cookiecheckonly=1 and you mentioned about a global, but I thought this approach might be simple enough.

It's basically extending startTimer to accept a time value and adding a special handling for when the start timer is t_page.

So you basically capture firstbyte in the beginning of your HTML by doing:

var firstbyte=new Date().getTime();

And then in bottom or after the boomerang.js has been loaded, you can do:

BOOMR.plugins.RT.startTimer("t_page", firstbyte);

and that should do it.

hanoii commented 13 years ago

Just wondering if there's a chance this might be reviewed? Thanks and sorry to bother.

bluesmoon commented 13 years ago

looking at it

hanoii commented 13 years ago

indentation fixed.. I did noticed some other indentation discrepancies on the code on some parts not related to this, just letting you know.

bluesmoon commented 13 years ago

yeah, the random sampling code. i'm gonna drop that at some point

bluesmoon commented 13 years ago

could you also update the documentation for this?

hanoii commented 13 years ago

ha, documentation... never something that exciting to do! Sure.. will do that really soon, do review though as english is not my native language so I might miss some grammar or spelling.

bluesmoon commented 13 years ago

yeah, I'll fix any typos or errors, don't worry about that.

btw, do you feel like translating the docs to spanish (or any other language)?

hanoii commented 13 years ago

definitely something I can do, although probably not right now, but will try to remember and contribute it if I can.. and yes, it would be just Spanish for a proper translation.