Installation of PHP performance Test Kit-XHPROF

Source: Internet
Author: User
Installation of PHP performance test tool--xhprof

Xhprof is an open source PHP performance testing tool for Facebook, and is widely used in the Facebook development process.

?

First, the installation of Xhprof

?

1. Download address:http://pecl.php.net/get/xhprof-0.9.2.tgz

?

?? Under Linux, execute the command:wget?http://pecl.php.net/get/xhprof-0.9.2.tgz

?

2. Since xpprof comes with a Web analytics page, it can be placed in the Web server directory

?

?? MV xhprof-0.9.2.tgz/www/webroot/

?

?? cd/www/webroot/

?

3. Unzip: Tar xzf xhprof-0.9.2.tgz, get the extracted file xhprof-0.9.2

?

?? CD xhprof-0.9.2

?? Into the file, you can see the XHPROF directory structure? :

?

?

?????? CHANGELOG
?????? CREDITS
?????? Examples
?????? Extension
?????? LICENSE
?????? Readme
?????? Xhprof_html
?????? Xhprof_lib

?

? For a software is not very understanding, the best way is to open the Readme file, to see exactly.

?

? VI README

?

? Cha! For installation and usage notes refer to:
??????? Xhprof_html/docs/index.html

?

?? Then we have to open xhprof_html/docs/index.html this file (I just put the entire xhprof in the Web server directory, so it can be opened directly under the browser). There is a detailed introduction to XHPROF under this document, the following highlights the installation steps:

The Stepsbelow should work for Linux/unix environments.

% CD 
 
  
   
  /extension/% phpize%./configure--with-php-config=
  
   
    
   % make% make install% make test
  
   
 
  

?

4. Follow the instructions above to install

?

?? A.??? CD extension/?????????????????? Go to Catalog

?? B.??? ~/web/php/bin/phpize???? Phpize is used to extend the PHP extension module, under the PHP installation directory of the bin

?? C.??? ./configure? --enable-xhprof? --with-php-config=~/web/php/bin/php-config

?? D.??? Make&make Install

?

? The above steps are completed and a. So file is generated

?

?

5. Configure PHP.ini

?

? Configure the Xhprof extension in php.ini, open the php.ini, and add it at the end of the file:

?

[xhprof]extension=xhprof.soxhprof.output_dir=
 
  
   
      //can define its own output file
 directory
  

Note: The directory that the Xhprofy stores is consistent with the directory Extension_dir in PHP.ini.

?

6. Restart PHP

??? ~/WEB/PHP/SBIN/PHP-FPM Reload

?? You can see the xhprof extension installed successfully in the Phpinfo information.

?

?

?

Specific to the use of xhprof, you can refer to the XHPROF installation directory under the/xhprof_html/docs/index.html, there are detailed instructions for use

?

  • Related Article

    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.