TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-03-2008, 06:13 AM   #1 (permalink)
The Wanderer
 
Join Date: Apr 2008
Posts: 6
Thanks: 0
Garrett is on a distinguished road
Default Accurate Page Load Time

I am using Smarty (best thing ever), and I would like to see the actual amount of time it is saving. All the little snippets (figured there would be a quick copy-paste), but they are all very different...
Example numbers...
214,22455.5556...
525525.22255
0.75 (Most accurate, but limits only 2, after 10 refreshes, it goes back to 9 assuming it's .099, not .9)

So what is the best way to do it, that will give me enough to analyze as well?
Garrett is offline  
Reply With Quote
Old 05-03-2008, 09:28 AM   #2 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

The time your page takes to load is really random. It takes longer to do a process at times than others. The speed depends mostly on what else is running (in my experience)

As for the timing, use benchmarks.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 05-03-2008, 09:39 AM   #3 (permalink)
The Wanderer
 
Join Date: Apr 2008
Posts: 6
Thanks: 0
Garrett is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
The time your page takes to load is really random. It takes longer to do a process at times than others. The speed depends mostly on what else is running (in my experience)

As for the timing, use benchmarks.
I don't care if it's "random" as you say...generally they will all be the same unless, well I don't even know when. I doubt Smarty puts any strain on anything to make it execute longer. I just need a bulletproof method to track page load time, that is all.
Garrett is offline  
Reply With Quote
Old 05-05-2008, 05:40 AM   #4 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Most I've seen use microtime at the start of the script and then run it again at the end of the script. Find the difference and that is how long it takes to run.

Each refresh will be different since many different factors contribute to how long it takes a server to generate a page.
__________________
Eric
wGEric is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:18 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design