Skip to content
Zhibin Huang edited this page Sep 10, 2015 · 6 revisions

Instructions for installing webgrind

Requirements

To run Webgrind you need a web server with PHP 5 installed. Webgrind uses json_encode that is available from PHP 5.2 or as a PECL extension before that.

Xdebug does the actual profiling so that should be installed first. Then add the following to your php.ini file:

Always profile scripts with Xdebug:

xdebug.profiler_enable = 1 

Alternatively, enable profiling with GET/POST parameter XDEBUG_PROFILE, e.g. http://localhost/samplepage.php?XDEBUG_PROFILE:

xdebug.profiler_enable_trigger = 1

Please refer to the Xdebug manual for further configuration settings.

Installation

  1. Download Webgrind.
  2. Extract Webgrind to a folder accessible to the web server.
  3. Start using Webgrind with your browser of choice by navigating to the URL of your Webgrind install, e.g. http://localhost/webgrind.

Installing Webgrind on production servers is highly discouraged as it might allow access to sensitive files.

Configuration

Webgrind can be configured by editing the config.php file in the webgrind directory, but should work with default settings provided Xdebug is installed and configured correctly.

  • $storageDir : path to a writeable directory where webgrind will store processed cachegrind files.
  • $profilerDir : If Xdebug is not installed, this variable defines a directory searched for cachegrind files. If Xdebug is installed, webgrind will look for cachegrind files defined by the xdebug.profiler_output_dir setting. The default is /tmp.

Further configuration options are described in the config.php file itself.

Configure Call Graph

for Ubuntu,

# you need to instlal graphviz
sudo apt-get install graphviz 

# update the dot executable in config.php
static $dotExecutable = '/usr/bin/dot';
Clone this wiki locally