XHProfをインストール、XHGUIをインストールしたので、
今回はコールグラフを表示するようにします。
「Graphviz」が必要になるので、インストールします。
環境
CentOS | 6.7 |
---|---|
PHP | 5.4.45 |
VCCW | 2.21 |
Graphvizのインストール&設定
インストール
$ vagrant ssh
$ sudo yum -y install graphviz graphviz-gd
xhgui/xhprof_lib/config.phpの編集
以下の記述がコメントアウトされているので外します。
[DocumentRoot]/xhgui/xhprof_lib/config.php
//These are good for linux and its derivatives.
$_xhprof['dot_binary'] = '/usr/bin/dot';
$_xhprof['dot_tempdir'] = '/tmp';
$_xhprof['dot_errfile'] = '/tmp/xh_dot.err';
確認
http://test.xhprof/xhgui/xhprof_html/index.php
から詳細ページへ行きます。
すると以下のような「View Callgraph」というリンクあると思います、
をれをクリックすると以下のようなページが確認できると思います。