library xhprof-helper
Helper script for profiling with XHProf.
rallen-temp/xhprof-helper
Helper script for profiling with XHProf.
- Tuesday, October 18, 2016
- by AlexanderAllen
- Repository
- 1 Watchers
- 0 Stars
- 22 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
XHProf Helper
Helper scripts for profiling PHP code with XHProf., (*1)
Installation
Stub., (*2)
- Included in localenv stack.
- How to use, view results.
Profiling Drush
Locate your drush.php file and at the top add:, (*3)
#!/usr/bin/env php
<?php
use rallentemp\DrushProfiler;
Then within drush_main(), add:, (*4)
function drush_main() {
$COMPOSER_HOME = (array_key_exists('COMPOSER_HOME', $_SERVER)) ? $_SERVER['COMPOSER_HOME'] : '/composer';
require $COMPOSER_HOME . "/vendor/autoload.php";
new rallentemp\DrushProfiler();
...
TODO, (*5)
- Update README
- Is there a way to create a drush command wrapper with as minimal forking as possible?
- More documentation about installation (containers, vhost, etc.).
References, (*6)
- http://php.net/manual/en/xhprof.examples.php