Solved

Execution time evaluation

Posted on 2009-05-18
2
230 Views
Last Modified: 2012-05-07
hi,

I use XAMPP  to run PHP.  I want to know the functions available for evaluate  execution time and little explanation for how can use that and occations that we can use that functions.  
0
Comment
Question by:shaf81
2 Comments
 
LVL 7

Accepted Solution

by:
ycTIN earned 350 total points
ID: 24411948

<?php
$time_start = microtime(true);//record start time
 
//repeat 10000 time
$i = 10000;
while ($i--) {
	//process
}
 
$time_end = microtime(true);//record end time
 
//calculate and format output
$time = number_format(($time_end - $time_start) * 1000,4);
echo "execution time : $time ms\n";
?>

Open in new window

0
 
LVL 4

Assisted Solution

by:max-hb
max-hb earned 150 total points
ID: 24412494
Hi!
If you need a more sophisticated profiling tool take a look at http://freshmeat.net/projects/phpprofiler/

phpprofiler offers you several options to fine tune profiling and enables you to measure performance of nested blocks.

CU
 maxhb
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question