Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katyo/xhprof-helper
Kayofication PHP-XHProf server-side support and helper chromium extension
https://github.com/katyo/xhprof-helper
Last synced: 16 days ago
JSON representation
Kayofication PHP-XHProf server-side support and helper chromium extension
- Host: GitHub
- URL: https://github.com/katyo/xhprof-helper
- Owner: katyo
- Created: 2012-10-24T15:28:30.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-29T18:22:34.000Z (about 12 years ago)
- Last Synced: 2024-10-30T16:12:07.973Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* Overview
This is a simple [[http://pecl.php.net/package/xhprof][XHProf]] helper which makes profiling PHP apps with XHProf safe and easy.
It consists of [[http://www.chromium.org/Home][Chromium]] extension and some pieces of PHP code on a server side.
*WARNING:* This software in _alpha stage_, so some features _may don't work properly_.* Configuration
** XHProf
Recommended /xhprof.ini/ looks like:
: ; XHProf profiling logs will be located here
: xhprof.output_dir=/var/log/xhprof
: ; XHProf library are located here
: xhprof.library_dir=/usr/share/php5-xhprof/xhprof_lib
: ; XHProf secret key (optionally may be used for
: ; preventing profiling requests from outsiders)
: xhprof.secret_key=‹∞juju∞›
: ; PHP Header and Footer (need for profiling any hosted script)
: auto_prepend_file=/path/to/server/auto_head.php
: auto_append_file=/path/to/server/auto_foot.phpCode of /server/auto_{head,foot}.php/ may contains any hooks, required your frameworks/hostware.
For example, profiling of Drupal requires to call _k10n_xhprof_foot() at drupal_exit().
I propose a simple solution here:
: function system_exit(){
: _k10n_xhprof_foot();
: }** Web-server
You need convert X-HProf request header to server variable XHPROF_COOKIE. For Nginx FastCGI simply add:
: fastcgi_param XHPROF_COOKIE $http_x_hprof;** Extension
You need to configure extension before first profiling session.
+ Set XHProf GUI url
+ Set secret key (optional)