PHP Performance analysis tool XHPROF user manual

Source: Internet
Author: User

Xhprof is a tool used by FB to analyze the performance of PHP programs, using lightweight and convenient. Official address: Http://mirror.facebook.net/facebook/xhprof/doc.html#installation


1, installation use:

wget http://pecl.php.net/get/xhprof-0.9.2.tgz
Tar zxf xhprof-0.9.2.tgz
CD xhprof-0.9.2
Cp-r xhprof_html Xhprof_lib <directory_for_htdocs>
CD extension
Phpize

./configure–with-php-config=/usr/local/php/bin/php-confg

Make
Make install

edit php.ini:

[Xhprof]
Extension=xhprof.so
;
; Directory used by default implementation of the Ixhprofruns
; Interface (namely, the Xhprofruns_default Class) for storing
; Xhprof runs.
;
Xhprof.output_dir=<directory_for_storing_xhprof_runs>

Note Setting directory permissions for Xhprof.output_dir

Restart the service so that the changes take effect, you can now use Xhprof, but in order to show the effect is more dazzling, it is best to continue to install Graphviz.

Use Phpinfo () to confirm that the installation is correct


Install libiconv-1.13.1.tar.gz

Install Graphviz

wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.24.0.tar.gz
Tar zxf graphviz-2.24.0.tar.gz
CD graphviz-2.24.0
./configure
Make
Make install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.