[xdebug-general] Inconsistent profiling data

From: Jan Schneider <jan[@]horde.org>
Date: Thu, 20 Jan 2005 17:14:13 +0100


I finally got xdebug compiled and running as a shared extension, but
unfortunately this didn't fix the issues I experienced while running it
statically compiled into PHP.

The profiler, viewing its generated data in KCachegrind, produces
inconsistent profiling data. I requested the same page several times and
then compared the results. I ignored the first request to avoid caching
side effects. What I expected was varying numbers for calls that include
external requests like net connections etc., but the same numbers for all
other calls.

While the "big picture" stayed the same, the time values varied a lot
though. Aren't these CPU times that should stay more or less the same at
least for pure PHP code? The procentual numbers aren't much better, the
ranking of the most expensive calls varies too. Worst is that sometimes, in
about 1 of 5 cases, one single call is completely off. E.g. a function that
does the same from the 2nd time it was called and that got called a few
hundred times, usually takes 2-3% of the script's time, but in this one
case 30-50%. No external resources involved. I've even seen the line count
being off by one in one case.

Is this the expected behaviour, or is this something on my end, and can I do
anything to prevent this? In the current state I can only use it to get some
rough impression, but it is useless when I want to tweak my scripts and
compare the performance after and before code changes.


Do you need professional PHP or Horde consulting?
Received on Thu Jan 20 2005 - 17:12:57 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST