Skip to content

Chassis/Chassis_XHGui

Repository files navigation

XHGui

A Chassis extension to install and configure XHGui on your Chassis server. This extension also has XHProf as a dependency so it will be installed and configured automatically as well.

Installation

  1. Add this extension to your extensions directory git clone --recursive git@github.com:Chassis/Chassis_XHGui.git extensions/chassis_xhgui
  2. Note: The folder that you clone into must be called chassis_xhgui.
  3. Run vagrant provision.

Alternative Installation

  1. Add - chassis/chassis_xhgui to your extensions in yaml files. e.g.
    extensions:
    - chassis/chassis_xhgui
    
  2. Run vagrant provision.

Please note: vagrant provision can take quite a few minutes due to the amount of Composer dependencies in XHGui. So when you see the provisioning process taking a long time on Service[php7.0-fpm] please be patient as this is the stage where Composer dependencies are being installed.

Usage

Browse to http://vagrant.local/xhgui in a browser. If you have a custom host hame it will be http://<yourhostname>.local/xhgui.

If you're using custom paths you'll need to change the URL to add your custom base. For example: If you've Chassis located in a chassis folder then the URL will be http://vagrant.local/chassis/xhgui or http://<yourhostname>.local/chassis/xhgui.

Controlling When the Profiler Runs

This extension enables the XHProf profiler for every request. You can control whether or not the profiler runs from the profiler.enable callback function that is contained within the extensions/chassis_xhgui/xhgui/config/config.php file.

From this callback function you can perform logic based on $_SERVER values, php_sapi_name(), etc, but remember that WordPress has not loaded at this point so you can't use any function that WordPress provides.

'profiler.enable' => function() {
	if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp-admin/' ) ) {
		// Disable the profiler for requests to wp-admin:
		return false;
	}

	// Enable the profiler for all other requests:
	return true;
},

Further information about configuring the profiler and other XHGUI options can be found in the XHGUI repo documentation.

Uninstallation

  1. Add - chassis/chassis_xhgui to your disabled_extensions in yaml files. e.g.
    disabled_extensions:
    - chassis/chassis_xhgui
    
  2. Run vagrant provision.

Screenshots

Recent Runs

Profile Data

Call Graph

Flame Graph

Function Calls

About

A Chassis extension to install and setup XHGui on your server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •