XHProf profiling - How to get hierarchical profile?

568 views Asked by At

I can see high CPU usage when I hit search URL of my Drupal application. I have enabled XHProf module and UProfiler extension on PHP5.6 to find the culprit function.

But the report I am getting is giving me only the first level of functions which takes cpu time.

enter image description here

But, there is no hyperlink on the function names to click on it and drill down. Any suggestions on what else can be done to drill down?

Basically it shows only flat profile, how do I get Hierarchical profile view?

2

There are 2 answers

2
NoiseByNorthwest On

You should take a look at php-spx https://github.com/NoiseByNorthwest/php-spx

It's a (tracing/sampling) profiler shipped with its web UI to allow in-depth analysis of profiling report (interactive time line, flat profile, Flamegraph).

DISCLAIMER: I'm the author.

0
Patrick Allaert On

This is fully possible with the native GUI that comes with Xhprof, you just have to make the xhprof_html directory reachable from your document root.