Re: how to benchmark the production code ?
| From: | messju mohr | Date: | Thu, 03 Apr 2003 17:09:45 +0000 |
| Subject: | Re: how to benchmark the production code ? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4629@lists.php.net to get a copy of this message | ||
On Thu, Apr 03, 2003 at 06:52:04PM +0200, luro@ze-ro.net wrote:
> hello,
>
> I have installed and tested the Benchmark package of Pear.
> I enjoyed it and think it can be a very useful tool.
>
> I'd like a more "high-end api" for benchmark, relying on the pear classes.
> (could be evolution of the benchmark package)
> Here is briefly the thing I'd like to do, but for wich I can't find a solution
> (may be someone could help me) :
>
> I'd like to implement Markers in ALL my code. But I'd like to be able to
> activate or deactivate those markers because I don't want the pear classes to
> work all time, but only when measures are required to solve a specific problem
> that as been suspected.
> I also don't want to touch the code itself.
>
> This could be seen as a precompilation level either processing the benchmark
> statement or not.
>
> For some specific scripts there are many work around possible for that.
> As an example it's possible to code the pear into specific commented tags that
> could be parsed and deleted before benchmark runs.
> I did this in some small tests.
> I have a benchmark script that call the production script, parse the comment
> and then activate benchmark statements, and finally evaluate the php code
> (either with eval() or output buffering and include statements) and handle the
> benchmarks results.
>
> This is absolutely "Work Around" and it is not really clean. It may not work
> for all scripts, for several reasons (include statements, path and so on ...)
>
> Does anyone has already been looking for this kind of benchmark behaviors and
> have any ideas or possible solutions ?
i like dbg: http://dd.cron.ru/dbg/
see http://dd.cron.ru/dbg/dnld/prof_results2.zip
for an example of
accessing the gathered profiling-info.
> ze-ro