Skip to content

Instantly share code, notes, and snippets.

@appkr
Created March 12, 2017 04:24
Show Gist options
  • Save appkr/13648361c92aa06d3d73536dca06e065 to your computer and use it in GitHub Desktop.
Save appkr/13648361c92aa06d3d73536dca06e065 to your computer and use it in GitHub Desktop.
xhgui config
<?php
/**
* Default configuration for Xhgui
*/
return array(
'debug' => false,
'mode' => 'development',
// Can be either mongodb or file.
/*
'save.handler' => 'file',
'save.handler.filename' => dirname(__DIR__) . '/cache/' . 'xhgui.data.' . microtime(true) . '_' . substr(md5($url), 0, 6),
*/
'save.handler' => 'mongodb',
// 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',
// Allows you to pass additional options like replicaSet to MongoClient.
// 'username', 'password' and 'db' (where the user is added)
'db.options' => array(),
'templates.path' => dirname(__DIR__) . '/src/templates',
'date.format' => 'M jS H:i:s',
'detail.count' => 6,
'page.limit' => 25,
// Profile 1 in 100 requests.
// You can return true to profile every request.
'profiler.enable' => true,
'profiler.simple_url' => function($url) {
return preg_replace('/\=\d+/', '', $url);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment