require_once('benchmark/iterate.php');
$benchmark = new benchmark_iterate();
$benchmark->run(10, 'myfunction','test');
$result = $benchmark->get();
echo "
"; print_r($result); echo "
";
exit;
function myfunction($var) {
// do something
echo 'hello ';
}
?>
array
(
[1] => 0.000427 [2] => 0.000079 [3] => 0.000072 [4] => 0.000071 [5] => 0.000076 [6] => 0.000070 [7] => 0.000073 [8] => 0.000070 [9] => 0.000074 [10] => 0.000072 [mean] => 0.000108 [iterations] => 10)
新闻热点
疑难解答