On Mon, Apr 7, 2008 at 2:02 PM, Bernard Li <[EMAIL PROTECTED]> wrote:
> Hi all:
>
>  I have a Ganglia page which takes quite a bit of time to load and I
>  was wondering if anybody have any PHP code that will allow me to
>  measure the load time and print this in the main page (much like the
>  "Downloading and parsing ganglia's XML tree took 0.0073s." line).

$start = microtime();
<....>
$end = microtime();
$delta = round($end - $start, 4);
print "Generating this page took $delta seconds";


Have to make sure that this isn't called for every single graph
though, since that's a waste.  It should give one tenth of a
millisecond precision (from the "round(..., 4)") to match the XML
output.

Should be fairly simple to add.

>  I guess I could use some third-party plugins for Firefox or something
>  for this, but thought it might be of general interest to put this in
>  the main page...

Firebug will tell you.


-- 
Jesse Becker
GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to