2017 © Pedro Peláez
 

silverstripe-module silverstripe-xhprof

A Silverstripe module for facilitating profiling with XHProf

image

titledk/silverstripe-xhprof

A Silverstripe module for facilitating profiling with XHProf

  • Sunday, October 27, 2013
  • by titledk
  • Repository
  • 4 Watchers
  • 11 Stars
  • 59 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 786 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

XHProf module for Silverstripe

A Silverstripe module for facilitating profiling with XHProf., (*1)

Since the Silverstripe 3 release, Silverstripe's built-in profiling has been disabled (see this thread). Thus, this module has sprung out of neccesity for profiling in Silverstripe 3., (*2)

This is a fork from the XHProf PHP compiler, open sourced by Facebook in 2009. It has been amended for easy integration with Silverstripe as well as installation instructions in this readme., (*3)

Requirements

  • *nix environment (probably works on OSX as well)
  • Silverstripe 3+
    Would also work on older Silverstripe versions, but installation instructions need to be amended

Installation

XHProf needs to be installed and running on your system for this module to work. Once XHPprof has been installed, follow the following steps:, (*4)

  • Download this module, and place it in your Silverstripe root, calling it xhprof
  • Edit /framework/main.php, adding the following lines at the very top (under <?php), and at the very bottom:
    include "../xhprof/_includes/header.php";
    include "../xhprof/_includes/footer.php";
  • Now, when running your site, you should see a Profiler output link on the very bottom of your site

Installing XHProf

On an *nix machine with PECL installed, follow this instruction:, (*5)

  • [sudo] pecl config-set preferred_state beta
  • [sudo ] pecl install xhprof
  • Once installed, add this to the end of your php.ini file:
[xhprof]
extension=xhprof.so
xhprof.output_dir="/var/tmp/xhprof"`

You might need to create the dirctory, (*6)

  • For the graphs to work, you need to install GraphViz:
    apt-get install graphviz

XHProf Resources

Other Solutions

Beyond XHProf another PHP profiling solution would be using xDebug, combined with a visualizer, which would either be built-in to an IDE, or using the PHP-based Webgrind web interface., (*7)

The Versions

27/10 2013

dev-master

9999999-dev

A Silverstripe module for facilitating profiling with XHProf

  Sources   Download

Apache License

The Requires

 

dev silverstripe profiling xhprof