phacility / xhprof

XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
http://pecl.php.net/package/xhprof
Apache License 2.0
2.6k stars 925 forks source link

[WIP] Track function arguments of whitelisted functions with special cases #41

Closed beberlei closed 9 years ago

beberlei commented 10 years ago

This patch is based on work by Syseleven (https://github.com/syseleven/xhprof) and adds the following functionality to XHProf:

Compiling this patch is tricky because of the curl dependency. You need to copy the file ext/curl/php_curl.h from the PHP-src to your include folder, for example /usr/include/php/ext/curl/php_curl.h. PHP does not expose php_curl.h by default, the header is only necessary because we need to access the struct php_curl for accessing the effective URL during curl_exec calls.

This is only tested with PHP 5.4.31 and 5.5.15 at the moment.

Example: https://gist.github.com/beberlei/231fa0f97e868d2ea97e