In the D7 version of XHProf, it is possible to click on entries in admin/reports/xhprof/%, to show details for the respective call.
In the D8 version, this seems no longer possible. The names are not clickable.
And the UI does not explain why.
Like this, the module is only half as useful.

Comments

donquixote created an issue. See original summary.

gokulnk’s picture

Priority: Normal » Major

Increasing the priority to Major as this functionality is critical to this module. Please change it back if you think otherwise.

imclean’s picture

This would be a very useful feature.

Our work around for now is to use the code supplied with the PECL extension.

  1. In php.ini (or xhprof.ini ) specify a non-tmp directory as xhprof.output_dir, restart httpd
  2. From the PECL package, copy the contents of "xhprof_html" (e.g. /usr/share/pear/xhprof_html ) to a local web directory
  3. Edit the file index.php from step 2 and set $GLOBALS['XHPROF_LIB_ROOT'] to the directory in step 1
  4. Do some profiling in Drupal to grab traces
  5. In your web browser, visit the the directory set up in step 3. E.g. http://localhost/xhprof
andypost’s picture

It needs to implement \Drupal\xhprof\Controller\XHProfController::symbolAction()

nixou’s picture

Here is a patch with symbolAction() implementation.

I didn't find out how to have the "Exclusive Metrics for Current Function" and there is no link "View Top Level Run Report" as we had on D7 version.

But the main behavior seems ok.

nixou’s picture

Status: Active » Needs review
imclean’s picture

Having a look now, the patch seems to work well. Thanks.

vurt’s picture

Status: Needs review » Reviewed & tested by the community

I tested the patch against the current version and it works fine. With this patch the module is so much better. Thank you!

andypost’s picture

It looks great! just minor nitpicks like missing phpdocs and different array formatting

PS: somehow it needs to setup testing of the module classes in separate issue

andypost’s picture

andypost’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/src/Controller/XHProfController.php
@@ -161,8 +161,34 @@ class XHProfController extends ControllerBase {
+    $sort = $request->get('sort', 'wt');

it should be request->query->get()

vurt’s picture

I made a new version of the patch addressing the request->query->get(). I also changed the array syntax.
I did not feel that I know enought about the module to add meaningful phpdocs...

vurt’s picture

Status: Needs work » Needs review

Changed to needs review.

  • moshe weitzman committed 9c74848 on 8.x-1.x authored by vurt
    Issue #2696537 by vurt, Nixou: XHProf entries are not links in D8
    
moshe weitzman’s picture

Status: Needs review » Fixed

Sorry, I'm not really maintaining this module but I needed it today so trying to pitch in. This patch works and is sorely needed so in it goes.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.