Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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

Replies are listed 'Best First'.
Re: Page Load Metrics
by flexvault (Monsignor) 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 Discipulus (Monsignor) on Dec 21, 2015 at 20:24 UTC
    Sorry if i'm so late.. have you seen my WebTimeLoad 0.15 scan and time website using LWP::Ua? I still use it and I still find it useful.


    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Page Load Metrics
by scorpio17 (Abbot) on Apr 03, 2013 at 20:04 UTC

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1026669]
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2018-07-21 04:31 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (444 votes). Check out past polls.