Archived
1
0
Fork 0
This commit is contained in:
H Hautakoski 2010-09-19 16:33:23 +02:00
parent 7cc97822d0
commit c0189183f9

View file

@ -41,11 +41,11 @@ class Fiktiv_Performance
'results' => array()
);
for ($x=0;$x<$times;$x++) {
for($x=0; $x < $times; $x++) {
self::begin();
for ($y=0;$y<$iterations;$y++) {
for($y=0; $y < $iterations; $y++) {
call_user_func_array($function, $params);
}
@ -53,12 +53,13 @@ class Fiktiv_Performance
$result['total'] += self::result();
if ($result['min'] > self::result() || empty($result['min']))
if ($result['min'] > self::result() || empty($result['min'])) {
$result['min'] = self::result();
}
if ($result['max'] < self::result())
if ($result['max'] < self::result()) {
$result['max'] = self::result();
}
}
$result['avg'] = array_sum($result['results']) / count($result['results']);