Home » Benchmarking » Benchmark » Bug #3369
Profiler : Manual mode generates automatic output
Details
| Submitted | 2005-02-03 12:30 UTC |
|---|---|
| From | ojai at nerim dot net |
| Assigned | toggg |
| Status | Closed |
| Package | Benchmark |
| PHP Version | 4.3.4 |
| OS | Linux Debian |
| Roadmaps | (Not assigned) |
Comments
[2005-02-03 12:30 UTC] ojai at nerim dot net
Description:
------------
Hi,
I'm running Benchmark 1.2.2.
When instantiating without automatic profiling :
$this->_profiler =& new Benchmark_Profiler();
I get some output even If do not call display().
This comes from Benchmark/Profiler.php, line 161, in the destructor :
function _Benchmark_Profiler() {
if (isset($this->auto)) {
$this->stop();
$this->display();
}
}
The isset() test evaluates to true even if automatic profiling is disabled, since $this->auto is always set, either to true or false.
This issue gets fixed by replacing the isset() test with :
if ($this->auto)
[2005-02-03 12:40 UTC] ojai at nerim dot net
I just realized that this bug has another effect :
In manual mode, the Profiler outputs :
"reached end of section Global but expecting end of"
While everything is set up correctly : I call stop() and display the data by myself. The fact that the destructor calls stop() and display() again seems to trigger this error.
Fixing the isset() call, as previously described, fixes this junk output as well.
[2005-05-19 09:49 UTC] indeyets at gmail dot com
Matthias, will there be new release of Benchmark any time soon? Living with manually-fixed pear-package makes me nervous :-/