rallen-temp/xhprof-helper

Helper script for profiling with XHProf.

dev-master 2016-10-18 16:09 UTC

This package is not auto-updated.

Last update: 2024-05-25 17:44:07 UTC


README

Helper scripts for profiling PHP code with XHProf.

Installation

Stub.

  • Included in localenv stack.
  • How to use, view results.

Profiling Drush

Locate your drush.php file and at the top add:

#!/usr/bin/env php
<?php

use rallentemp\DrushProfiler;

Then within drush_main(), add:

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

  • 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