Introduction: This is a detailed page for installing the PHP Performance Testing Tool-xhprof. It introduces PHP, PHP, and stress testing, xhprof PHP Performance Testing Tool-knowledge, skills, experience related to xhprof installation, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 360992 'rolling = 'no'>
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 following 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 will 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 steps
Below shoshould work for Linux/UNIX environments.
% Cd <xhprof_source_directory>/extension/% phpize %./configure -- With-PHP-Config = <path to PHP-config> % 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 = <directory_for_storing_xhprof_runs> // 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.
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/360992.html pageno: 1.