Php performance testing tools-installation of xhprof

Source: Internet
Author: User
Php performance testing tool-xhprof installation xhprof is an open-source php performance testing tool developed by facebook. it is widely used in the development process of facebook .? 1. how to install xhprof? 1.: http://pecl.php.net/get/xhprof php performance testing tool-xhprof installation

Xhprof is an open-source php performance testing tool developed by facebook. it is widely used in facebook development.

?

I. installation of xhprof

?

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

?

?? In linux, run the command: wget? Http://pecl.php.net/get/xhprof-0.9.2.tgz

?

2. because xpprof comes with a web analysis page, you can put it under the web server directory.

?

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

?

?? Cd/www/webroot/

?

3. decompress: tar xzf xhprof-0.9.2.tgz to get the decompressed file xhprof-0.9.2

?

?? Cd xhprof-0.9.2

?? Go to the file and you can see the directory structure of xhprof? :

?

?

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

?

? I don't know much about a piece of software. The best way is to open the README file and check it out.

?

? Vi README

?

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

?

?? So we have to open the xhprof_html/docs/index.html file (I just put the entire xhprof under the web server directory, so I can open it directly in the browser ). This file provides a detailed introduction to xhprof. the installation steps are as follows:

The stepsbelow shocould 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 /?????????????????? // Enter the Directory

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

?? C .??? ./Configure? -- Enable-xhprof? -- With-php-config = ~ /Web/php/bin/php-config

?? D .??? Make & make install

?

? After the preceding steps are completed, the. so file is generated.

?

?

5. configure php. ini

?

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

?

[Xhprof] extension = xhprof. soxhprof. output_dir =
 
  
// You can customize the output file directory.
 

Note: The Directory stored in xhprofy must be the same as the Directory pointed to by extension_dir in php. ini.

?

6. restart php

??? ~ /Web/php/sbin/php-fpm reload

?? In the phpinfo information, you can see that the xhprof extension is successfully installed.

?

?

?

For more information about how to use xhprof, see/xhprof_html/docs/index.html in the xhprof installation directory.

?

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.