Home » Benchmarking » Benchmark » Bug #2957
zero devision when calling getAllSectionsInformations
Details
| Submitted | 2004-12-13 14:23 UTC |
|---|---|
| From | maimonoded at yahoo dot com |
| Assigned | matthias |
| Status | Closed |
| Package | Benchmark |
| PHP Version | 4.3.9 |
| OS | windows |
| Roadmaps | (Not assigned) |
Comments
[2004-12-13 14:23 UTC] maimonoded at yahoo dot com
Description:
------------
package version 1.2.1
when calling to getAllSectionsInformations after a script that runs in less then a second recives:
Warning: Division by zero in \Benchmark\Profiler.php on line 173
Reproduce code:
---------------
<?php
require_once('Benchmark/Profiler.php');
$profiler =& new Benchmark_Profiler(false);
function myFunction()
{
global $profiler;
$profiler->enterSection('myFunction');
echo "in";
$profiler->leaveSection('myFunction');
return;
}
echo "out 1";
myFunction();
echo "out 2";
$info = $profiler->getAllSectionsInformations();
?>
Expected result:
----------------
out 1inout 2
Actual result:
--------------
out 1inout 2
Warning: Division by zero in c:\apachefriends\xampp\php\pear\Benchmark\Profiler.php on line 173