mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 16:31:53 +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:
parent
2fa1161d3d
commit
48cf55eae4
@ -41,16 +41,22 @@ class RowTimer extends Benchmark_Timer
|
|||||||
|
|
||||||
$out .= "<td>{$this->name}</td>";
|
$out .= "<td>{$this->name}</td>";
|
||||||
|
|
||||||
|
$standard = false;
|
||||||
|
|
||||||
foreach ($result as $k => $v) {
|
foreach ($result as $k => $v) {
|
||||||
if ($v['name'] == 'Start' || $v['name'] == 'Stop') continue;
|
if ($v['name'] == 'Start' || $v['name'] == 'Stop') continue;
|
||||||
|
|
||||||
//$perc = (($v['diff'] * 100) / $total);
|
//$perc = (($v['diff'] * 100) / $total);
|
||||||
//$tperc = (($v['total'] * 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, '.', '') .
|
if ($standard == false) $standard = $v['diff'];
|
||||||
// '%</td>';
|
|
||||||
|
$perc = $v['diff'] * 100 / $standard;
|
||||||
|
|
||||||
|
$out .= '<td align="right">' . number_format($perc, 2, '.', '') .
|
||||||
|
'%</td>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user