[xdebug-general] xdebug_get_function_profile

From: Chris Graham <chris[@]ocportal.com>
Date: Wed, 23 Jun 2004 20:34:34 +0100

Hi,

I am trying to get profile information outputted directly into my program,
as it runs (if you add something to the URL, it will give you a profile
dump instead of the normal script output). However I have a dilemma
with my choice between...
xdebug_get_function_profile, and xdebug_dump_function_profile.

The former doesn't apparently give me any location information, which
seems vital to the process. Whilst the latter gives me absolutely everything
and takes 30 seconds to process the output and then render it... I just
want to be able to pick all calls that have a computation time
exceeding some threshold / the top-X calls.

At the moment the best I can do is this ugly hack...
    ob_start();
    xdebug_dump_function_profile($type);
    $profile2=ob_get_contents();
    ob_end_clean();
    echo substr($profile2,0,10000)."</td></tr></table>";
But this still has to calculate all the html output before it's cropped, so
only
partially alleviates the problem.

Does version 2 solve this? Sorry if I'm meant to have dug and
researched this myself, just I'm a bit too tired for that adventure
right now ;).

Is there some other way around my problem that I've overlooked?

Kind regards and thanks,

Chris
Received on Wed Jun 23 2004 - 21:34:39 BST

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