I propose adding to the README some simple text and useful links. The XHProf docs are absolutely fine for getting people going, sure, people should be able to work that out for themselves, but some simple steps in the README couldn't hurt - install xhprof from PECL, enable and configure, read the docs for how the UI works - link. Job done! =)

If you think this is a good idea, happy to provide the patch to README.txt.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

Yes, definitely a good idea.

I've never used XHProf myself, so you'll need to find others to review and RTBC your patch.

Is there only one way to install XHProf?

greg.harvey’s picture

No, more than one way - you can also install manually, but PECL is easiest (when it works!) ... I'll work on a patch. =)

greg.harvey’s picture

Status: Active » Needs review
FileSize
3.51 KB

OK, here's a first pass.

salvis’s picture

This looks definitely valuable, thank you!

Any XHProf users out there who could review it?

moshe weitzman’s picture

Project: Devel » XHProf
Version: 7.x-1.x-dev »
Component: devel » Documentation

We are planning to remove xhprof integration from devel in favor of the revived and nice xhprof module. See http://drupal.org/project/xhprof.

greg.harvey’s picture

Sounds good. That module could do with an edit on the project page and a dev snapshot release though! Guess I'll raise an issue for that...

Edit: Done - #1304968: Update project page to explain this project is alive again

Anonymous’s picture

Version: » 7.x-1.x-dev
Status: Needs review » Needs work

The XHProf install step failed for me on a Mac with MAMP 2, but I was able to find a gist that worked really nicely: https://gist.github.com/1306569

It looks like these need to be updated for the change in modules, but as soon as I got XHProf installed, the admin screens worked for me.

nerdcore’s picture

I have installed the xhprof.so PHP extension using PECL and enabled it in /etc/php5/conf.d/xhprof.ini. This is working because I can see "xhprof" in the output of `php -m`.

I have installed the Drupal XHProf 7.x-1.0-beta2 module and enabled it on the Modules page of my site.

I have turned enabled the use of the module at Configuration -> Development -> XHProf settings (/admin/config/development/xhprof) by checking ON " Enable profiling of all page views and drush requests. "

Now what?

When I visit a page and click "XHProf output" at the bottom of the page, I get this error:

" Run #51b789ae8cea0: Invalid Run Id = 51b789ae8cea0 "

And the list of the "Top 100 functions" is totally empty. I am a bit lost as to what I should be seeing or where to go from here. Any help greatly appreciated.

jessepinho’s picture

@nerdcore: Did you add these lines to your php.ini?

[xhprof]
extension=xhprof.so
xhprof.output_dir="/var/tmp/xhprof"

Even after adding those lines, I was still getting the error you described. But when I manually created the /var/tmp/xhprof directory, it started working. Hope this helps!

sah62’s picture

Another note: your web server user needs to have write permission on the xhprof.output_dir directory.

donquixote’s picture

Issue summary: View changes

Thanks @jessepinho (#9) and @sah62 (#10).
This advice sounds obvious, but it would really help to have some error reporting on admin/reports/xhprof/% pages for non-writable or non-existing directories, or missing PHP configuration.

donquixote’s picture

davidwhthomas’s picture

FileSize
283.44 KB

Related to https://www.drupal.org/node/2393853
I just added some online documentation there for now.

I was especially interested in the glossary of XHProf terms:

  1. Inclusive Time (or Subtree Time): Includes time spent in the function as well as in descendant functions called from a given function.
  2. Exclusive Time/Self Time: Measures time spent in the function itself. Does not include time in descendant functions.
  3. Wall Time: a.k.a. Elapsed time or wall clock time.
  4. CPU Time: CPU time in user space + CPU time in kernel space

Attaching facebook XHProf docs from webarchive as pdf.
Perhaps the link on the project page could be updated to point to the new URL:
http://web.archive.org/web/20110514095512/http://mirror.facebook.net/fac...