1
lykoszine
This page loaded in x seconds
  • 2002/2/19 18:43

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


Does anyone know of a script that will tell me how long a page take sto load that I could fix to an admin block for admin purposes. Or to the footer for that matter?

If not any suggestions on how I could write one for xoops?

Cheers

2
Amgine
Re: This page loaded in x seconds
  • 2002/2/19 19:51

  • Amgine

  • Just popping in

  • Posts: 3

  • Since: 2002/1/5 1


I seem to recall seeing something like this in some part of XOOPS if you turn debugging on - perhaps you can find the relevant bits and enable them with your own specific flag? Sorry I can't recall the exact files, nor the time to check for you now.

Good luck


3
bob
Re: This page loaded in x seconds
  • 2002/2/20 1:46

  • bob

  • Just popping in

  • Posts: 8

  • Since: 2002/1/9 1


here's the little script in the footer of many myphpnuke sites. i'm just a crude hacker, not a php programmer, so I can't tell if this gives you enough to work with...

echo "
\n";
ss_timing_stop();
$help = sprintf(translate("Page took %s seconds to load."),ss_timing_current());
echo "$help";
echo "
\n";
echo "
\n";

4
Amgine
Re: This page loaded in x seconds
  • 2002/2/20 4:26

  • Amgine

  • Just popping in

  • Posts: 3

  • Since: 2002/1/5 1


This would need ss_timing_start() earlier - like in the header, or even in a script that was called earliest - before db queries etc.

And you would have to find the actual functions - I am not sure that these are PHP 'builtins'.

But it is a start - and the sort of thing embedded in XOOPS for debugging, as I referred to earlier.

5
lykoszine
Re: This page loaded in x seconds
  • 2002/2/20 14:36

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


The code you mentioned is in footer.php, around line 40 I think... It just needs uncommenting...

I have no idea how it is set up though, whether it is initialised in the header or what...

Does give me a general idea though...



6
ZPC
Re: This page loaded in x seconds
  • 2002/2/20 16:37

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


yeah...the function is hidden in include/functions.php (line 589) and as well as in footer.php it has to be uncommented in header.php which are both in root directory.

Then you will se what it takes to produce one page.

I would like to point out, that this text is not translated in regular language files !!!


7
AndyC
Re: This page loaded in x seconds
  • 2002/2/20 17:34

  • AndyC

  • Just popping in

  • Posts: 16

  • Since: 2002/1/10


it always takes 0 seconds on my site.

8
ZPC
Re: This page loaded in x seconds
  • 2002/2/20 17:47

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


are you sure, that you uncommented the line in header.php ??? it's the first line of the real code (below the standard file header)...

9
AndyC
Re: This page loaded in x seconds
  • 2002/2/20 17:59

  • AndyC

  • Just popping in

  • Posts: 16

  • Since: 2002/1/10


My Bad...

It works now. Thanks.

10
nocjock
Re: This page loaded in x seconds
  • 2002/2/20 18:49

  • nocjock

  • Just popping in

  • Posts: 19

  • Since: 2002/1/3 1


What kind of times are you all coming up with? Mine are always less than 1 second. This must be an internal server calculation, not necessarily time for actual page display, which is misleading to someone looking for response times to display, unless you work in the marketing department.

Login

Who's Online

251 user(s) are online (157 user(s) are browsing Support Forums)


Members: 0


Guests: 251


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits