0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

Switch benchmark to relative percents: makes comparisons easier.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@101 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-07-23 18:18:11 +00:00
parent 2fa1161d3d
commit 48cf55eae4

View File

@ -41,16 +41,22 @@ class RowTimer extends Benchmark_Timer
$out .= "<td>{$this->name}</td>";
$standard = false;
foreach ($result as $k => $v) {
if ($v['name'] == 'Start' || $v['name'] == 'Stop') continue;
//$perc = (($v['diff'] * 100) / $total);
//$tperc = (($v['total'] * 100) / $total);
$out .= '<td align="right">' . $v['diff'] . '</td>';
//$out .= '<td align="right">' . $v['diff'] . '</td>';
//$out .= '<td align="right">' . number_format($perc, 2, '.', '') .
// '%</td>';
if ($standard == false) $standard = $v['diff'];
$perc = $v['diff'] * 100 / $standard;
$out .= '<td align="right">' . number_format($perc, 2, '.', '') .
'%</td>';
}