2017 © Pedro Peláez
 

library xhprof-helper

Helper script for profiling with XHProf.

image

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

The README.md

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

The Versions

18/10 2016

dev-master

9999999-dev https://github.com/rallen-temp/xhprof-helper

Helper script for profiling with XHProf.

  Sources   Download

Unlicense

by Richard A. Allen