Improved benchmark tools

SVN:trunk[729]
This commit is contained in:
Romain Quetiez
2010-08-31 13:35:16 +00:00
parent 3c7af6d37f
commit 8fe9d25341
3 changed files with 27 additions and 10 deletions

View File

@@ -52,6 +52,8 @@ class ExecutionKPI
echo "====================<br/>\n";
$fTotalOp = 0;
$iTotalOp = 0;
$fMinOp = null;
$fMaxOp = 0;
foreach ($aOpStats as $sArguments => $aEvents)
{
$fTotalInter = 0;
@@ -60,12 +62,18 @@ class ExecutionKPI
{
$fTotalInter += $fDuration;
$iTotalInter++;
$fMinOp = is_null($fMinOp) ? $fDuration : min($fMinOp, $fDuration);
$fMaxOp = max($fMaxOp, $fDuration);
}
$fTotalOp += $fTotalInter;
$iTotalOp++;
echo "$sArguments: $iTotalInter (".round($fTotalInter, 3).")<br/>\n";
}
echo "Total: $iTotalOp (".round($fTotalOp, 3).")<br/>\n";
echo "Min: ".round($fMinOp, 3)."<br/>\n";
echo "Max: ".round($fMaxOp, 3)."<br/>\n";
echo "Avg: ".round($fTotalOp / $iTotalOp, 3)."<br/>\n";
echo "====================<br/>\n";
}
}