gajus / xhprof.io

GUI to analyze the profiling data collected using XHProf – A Hierarchical Profiler for PHP.
http://xhprof.io/
Other
429 stars 103 forks source link

Add CLI support to prepend/append #63

Open weitzman opened 10 years ago

weitzman commented 10 years ago

The prepend and append includes specifically do not support CLI requests. Is that a design choice or merely "noone has written it"? I'm interested in contributing this if there is interest. Any guidelines/tips would be appreciated.

gajus commented 10 years ago

I suppose the reason why CLI was chosen to be excluded is because xhprof interface relies on SERVER_NAME and similar environment variables. This would require either a separate interface for the CLI script execution index or default values to something like "CLI-ENV" and use file path instead of server name.

weitzman commented 10 years ago

yes, i think we can find good analogies for those env variables when running cli requests. implode(' ', $_SERVER["argv"]) is a good value for REQUEST_URI.

camronlevanger commented 10 years ago

I think CLI support by default would be a great addition. I might need to get it working for a project, if I do I will open a PR.

staabm commented 10 years ago

I would definitly accept a PR against https://github.com/staabm/xhprof.io for CLI support.

damienalexandre commented 9 years ago

:+1: