Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Page Load Metrics

by blue_cowdawg (Monsignor)
on Apr 02, 2013 at 12:18 UTC ( #1026669=perlquestion: print w/ replies, xml ) Need Help??
blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:

Before I go off and re-invent the wheel has anyone out there written a Perl script to perform metrics on page load time for a web site? I know I could write something myself, but....


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Comment on Page Load Metrics
Re: Page Load Metrics
by flexvault (Parson) on Apr 02, 2013 at 14:27 UTC

    Hi blue_cowdawg,

    I use Mozilla Firefox for web page development, and it has a plug-in caller "Lori" which gives statics for each and every page load, for instance this page from PM before I filled anything in has:

    0.955s 2.767s 40.31KB 2req
    which translates to:
    • 1st field: Time to first byte received back to browser from web server. (from click to 1st char received)
    • 2nd field: Time to completion. From click to complete display.
    • 3rd field: Total size of the page
    • 4th field: Number of requests needed to fulfill the page load.

    How this helps?

    The first field includes the time for my application to run, so it helps me control the internal time of my Perl application. If it's less than a second, Great! If it's 10.s then I may need work! I don't usually care about the 2nd field since that includes the time the browser needs to work. But sometimes it can show you that you have too many nested tables and maybe CSS would be a better solution.

    The 3rd and 4th fields can help with determining what can be cached for better performance.

    Hope this helps...Ed

    "Well done is better than well said." - Benjamin Franklin

Re: Page Load Metrics
by Anonymous Monk on Apr 02, 2013 at 19:09 UTC
    The ApacheBench tool (ab, contained in apache2-utils on Debian) that comes with an Apache installation probably provides the metrics you are looking for. But it does have one potentially large flaw: It only can benchmark a single URL at a time (and thus cannot provide a realistic workload for the server)
Re: Page Load Metrics
by scorpio17 (Monsignor) on Apr 03, 2013 at 20:04 UTC

    You might also want to check out Yahoo's YSLOW, and Google's PageSpeed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1026669]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (16)
As of 2014-10-23 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls