// Needed for file save handler. Beware of file locking. You can adujst this file path
// to reduce locking problems (eg uniqid, time ...)
//'save.handler.filename' => __DIR__.'/../data/xhgui_'.date('Ymd').'.dat',
'db.host' => 'mongodb://127.0.0.1:27017',
'db.db' => 'xhprof',
安装
tideways
配置ext-tideways.ini
重启php-fpm,查看phpinfo可以看到
mongodb
xhgui(bootstrap的ui)
修改配置
如果你的MongoDB安装在当前机器,可以不用修改xhgui的配置文件,如果不是你需要在配置文件中修改MongoDB的连接ip和域名,xhgui-branch/config/config.default.php。当然你也可以选择直接存为文件。
server { listen 80; server_name xhgui.cc; root /Users/qianlei/code/github/xhgui-branch/webroot; location / { index index.php; if (!-e $request_filename) { rewrite . /index.php last; } } location ~ .*.(php|php5)?$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
profiler.enable => function() { // 如果域名为我们新建的域名则不捕获 if($_SERVER[SERVER_NAME] == jcc.cc){ return False; }else{ // 100%采样,默认为1% return True;//rand(1, 100) === 42; } }