/    Sign up×
Community /Pin to ProfileBookmark

Timing requests on servers.

How is it going everyone.. I have been looking high and low for a script to learn off of.

What I would like to do with my website is see if my server is fast when executing php scripts. This could be positive in many different ways for me. Now, I understand what has to happen in “Theory”. I have to set a variable to hold the time when the server recieves a get or put from a browser. Then set a second variable to get the time after the script runs and before giving the requested file to the browser.

My problems are basically how. How would I access that type of information. is there a getenv() for something like that?

Thanks in advanced.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@jcampbeJun 01.2006 — [URL=http://ca3.php.net/getenv]http://ca3.php.net/getenv[/URL]

Theres an exerpt from the PHP manual, the one and only place that helps alot.

-Jcampbe
Copy linkTweet thisAlerts:
@Markbad311authorJun 01.2006 — Thank you for that but that brought me to a page that has detailed information on IP addresses... I Am looking for a solution in timing a page load.

Thank you
Copy linkTweet thisAlerts:
@NogDogJun 01.2006 — You can time the execution of your script internally with the microtime() function, but at best this only gives you the time it takes to run after the PHP process has read, parsed, and compiled your script. If you want the entire time, then it will need to be measured by something outside of your PHP script. Possibly you could search for something to do with webservers, log files, etc. and see if there are any configuration options for your webserver to log request times and output times. Then you could write a PHP (or Perl, etc.) script to parse that log to collect performance data.
Copy linkTweet thisAlerts:
@Markbad311authorJun 22.2006 — Sorry for the slow response time. I will loko for that resolution. I ran in to other issues and deadlines. In the meantime if anyone else has any idea or resource I can look up on the subject please free to post.

This topic is still unresolved.
×

Success!

Help @Markbad311 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...