Last active
February 16, 2017 01:27
-
-
Save psaraiva/7215743 to your computer and use it in GitHub Desktop.
Usando o xhprof.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pegar a pasta xhprof e jogar em /var/www | |
1. Install dependencies | |
# aptitude install php5-dev | |
2. Download xhprof source | |
$ cd /tmp | |
$ git clone git://github.com/facebook/xhprof.git | |
3. Install xhprof PHP extension | |
$ cd xhprof/extension | |
$ phpize | |
$ ./configure | |
$ make | |
# make install | |
# echo "extension=xhprof.so" > /etc/php5/conf.d/xhprof.ini | |
# echo "xhprof.output_dir=/tmp" >> /etc/php5/conf.d/xhprof.ini | |
Alterar o virtual host do projeto conforme exemplo | |
<VirtualHost *:80> | |
DocumentRoot "/var/www/meuprojeto.local/public" | |
ServerName blablabla.local | |
# This should be omitted in the production environment | |
#SetEnv APPLICATION_ENV development | |
SetEnv APPLICATION_ENV "testing" | |
<Directory "/var/www/meuprojeto.local/public"> | |
DirectoryIndex index.php | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
php_value auto_prepend_file "/var/www/xhprof/scripts/ini.php" | |
php_value auto_append_file "/var/www/xhprof/scripts/end.php" | |
</Directory> | |
#ErrorLog ${APACHE_LOG_DIR}/meuprojeto/error.log | |
</VirtualHost> | |
reiniciar o apache | |
# service apache2 restart | |
"Isso é tudo pe... pe... pe... pessoal" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment