4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Webpage stats
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
GunstarHero
Junior WebHelper
Junior WebHelper


Joined: 15 Apr 2003
Posts: 35

PostPosted: Wed May 07, 2003 2:45 pm (14 years, 7 months ago) Reply with QuoteBack to Top

Hi all,

I like the code at the bottom of the page:

Quote:
[ Page generation time: 0.491062 seconds ] :: [ 15 queries executed ]


How can I implement this for my site? I just want to use it to test how fast pages/queries are executed on my server.

Any pointers are much appreciated!

Cheers,

Anil
OfflineView User's ProfileFind all posts by GunstarHeroSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed May 07, 2003 3:01 pm (14 years, 7 months ago) Reply with QuoteBack to Top

Hi GunstarHero!

This should answer your question:

http://www.phpbuilder.com/columns/akent20000926.php3

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
SfCommand
Senior WebHelper
Senior WebHelper


Joined: 10 Nov 2002
Posts: 143
Location: UK

PostPosted: Wed May 07, 2003 3:07 pm (14 years, 7 months ago) Reply with QuoteBack to Top

How about the [x queries executed] bit? That article doesn't show how to do that.
Also, how did you get all the other stats on the stats.php page (like top used smily etc (cos atm, I'm using the php_fetch_info script, but it doesn't show that stuff))? Smile

________________________________
Miguel

http://community.34sp.com
http://www.miguel.me.uk | http://www.sfcommand.co.uk | http://www.ssdg.org.uk
OfflineView User's ProfileFind all posts by SfCommandSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed May 07, 2003 3:10 pm (14 years, 7 months ago) Reply with QuoteBack to Top

There's a very complete statistics script somewhere at phpBB.com and it includes a smilies stats section.

As to executed queries, either your database abstraction layer takes care of it, or you increment a variable everytime you run a query:
Code:
$i = !$i ? 0 : $i;
$i++;

[The database abstraction layer (at least phpBB's) will usually take care of this for you. If it doesn't, all you do is edit the function which runs the query and add a variable to count queries.]

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
SfCommand
Senior WebHelper
Senior WebHelper


Joined: 10 Nov 2002
Posts: 143
Location: UK

PostPosted: Wed May 07, 2003 3:19 pm (14 years, 7 months ago) Reply with QuoteBack to Top

OK, well I'll have to edit my page_footer file to show the page generation time, and find the SQL query thinggy Wink

________________________________
Miguel

http://community.34sp.com
http://www.miguel.me.uk | http://www.sfcommand.co.uk | http://www.ssdg.org.uk
OfflineView User's ProfileFind all posts by SfCommandSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed May 07, 2003 3:22 pm (14 years, 7 months ago) Reply with QuoteBack to Top

SfCommand: for phpBB there is already a MOD:

http://www.phpbb.com/mods/downloads/uploads/generation_creation_1.0.0.txt

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
GunstarHero
Junior WebHelper
Junior WebHelper


Joined: 15 Apr 2003
Posts: 35

PostPosted: Wed May 07, 2003 5:59 pm (14 years, 7 months ago) Reply with QuoteBack to Top

cheers!

Anil
OfflineView User's ProfileFind all posts by GunstarHeroSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.05163 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme