function xhprof_mongodb_install in XHProf 8
Same name and namespace in other branches
- 6 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()
- 7 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()
Implementation of hook_install().
File
- modules/
xhprof_mongodb/ xhprof_mongodb.install, line 29 - Install, update and uninstall functions for the XHProf module.
Code
function xhprof_mongodb_install() {
module_load_include('module', 'mongodb');
if ($collection = mongodb_collection('xhprof')) {
$collection
->ensureIndex([
"date" => -1,
"date" => 1,
]);
$collection
->ensureIndex([
"path" => -1,
"path" => 1,
]);
}
}