cleanup
This commit is contained in:
parent
7cc97822d0
commit
c0189183f9
1 changed files with 6 additions and 5 deletions
|
|
@ -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']);
|
||||
|
|
|
|||
Reference in a new issue