See drupalquickstart's Channel on Youtube for details on how to debug in Netbeans, and profile with XDebug and Webgrind.
Here's a short version of how to get XHProf to profile your Drupal 7 site.
From the command-line install the devel module with drush:
cd ~/websites/example.dev
drush dl devel
drush pm-enable devel
Then login to the site and configure it: http://example.dev/admin/config/development/devel
Check "Enable profiling of all pages ..."
xhprof directory: /home/quickstart/websites/logs/xhprof
xhprof URL: http://localhost/xhprof
Click "Save"
At the bottom will be a link to "XHProf..."
Click this to view the profile information for that page.
IMPORTANT! While XHProf is on, it will save a profile image for every page load (~ 150k). If you leave it on, these old profiles will start to add up.
To clean out these old profiles, do this:
sudo rm ~/websites/logs/xhprof/*.*
Comments
Hello, I followed these
Hello, I followed these instructions, however the following error message is coming out :
Warning: include_once(/home/quickstart/websites/logs/xhpr/xhprof_lib/utils/xhprof_lib.php): failed to open stream: No such file or directory in devel_xhprof_enable() (line 561 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(): Failed opening '/home/quickstart/websites/logs/xhpr/xhprof_lib/utils/xhprof_lib.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in devel_xhprof_enable() (line 561 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(/home/quickstart/websites/logs/xhpr/xhprof_lib/utils/xhprof_runs.php): failed to open stream: No such file or directory in devel_xhprof_enable() (line 562 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(): Failed opening '/home/quickstart/websites/logs/xhpr/xhprof_lib/utils/xhprof_runs.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in devel_xhprof_enable() (line 562 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
any suggestion?
Thanks
Also having issues- looks
Also having issues- looks like xhprof is up and running but when I click the link...
Warning: Invalid argument supplied for foreach() in /Users/brantwynn/Sites/xhprof/xhprof_lib/utils/xhprof_lib.php on line 503
Warning: Invalid argument supplied for foreach() in /Users/brantwynn/Sites/xhprof/xhprof_lib/utils/xhprof_lib.php on line 418
Warning: Invalid argument supplied for foreach() in /Users/brantwynn/Sites/xhprof/xhprof_lib/display/xhprof.php on line 931
Any ideas?
+1 !!
+1 !!
Had the same
Had the same "issue".
Configured "xhprof.output_dir" via ini_set in the monitored Project dynamically. So i needed to configure outputdir for the xhprof UI separately too.
Problem shouldn't occur if your xhprof.output_dir is configured global in php.ini
Same problem
I have the same problem. You got to fix it?
Fatal error: Class 'XHProfRuns_Default' not found in ...
When editing the devel settings, like instructed above:
Check "Enable profiling of all pages ..."
xhprof directory: /home/quickstart/websites/logs/xhprof
xhprof URL: http://localhost/xhprof
Click "Save"
I ran into Fatal errors. Fatal error: Class 'XHProfRuns_Default' not found in ...
My problem was related to devel not finding the xhprof class that starts the run and shutdown process.
To solve this problem I had to make sure that my file permissions and ownership were proper.
Here are the commands lines that I used to make this happen:
Thank you Elvis2
Thank you Elvis2
My xhprof works fine but the "Class missing" message is well annoying .. setting permissions sorted it.
Few Configurations Missing
In this document, there are few configurations which are missing inturn causing different errors.
The following link has a complete instructions for getting xhprof work with Devel :
http://drupal.stackexchange.com/questions/88359/install-and-configure-xh...
Regards
Chakrapani
Hi
Hi
I am getting following errors in the "Recent log messages":
I set the following at "admin/config/development/devel":
xhprof directory: /usr/share/php
xhprof URL: /xhprof_html
Also I am not getting "XHProf output" link at bottom left on the site.
What is the exact problem? permissions? wrong xhprof directory? or something else?
Thank You,
Shashwat Purav
Resolved the issue. Please
Resolved the issue. Please find below the key points whoever faces same kind of issue:
> Created "xhprof" directory in the /tmp folder.
> "xhprof_lib" and "xhprof_html" folders should be at same level. At "/usr/share/php" in my case.
Set the following at "admin/config/development/devel":
xhprof directory: /usr/share/php
xhprof URL: /xhprof_html
Flush cache and it works. :)
Thank You,
Shashwat Purav