function xhprof_mongodb_install in XHProf 7
Same name and namespace in other branches
- 8 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()
- 6 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()
Implementation of hook_install().
File
- modules/
xhprof_mongodb/ xhprof_mongodb.install, line 31 - 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(array(
"date" => -1,
"date" => 1,
));
$collection
->ensureIndex(array(
"path" => -1,
"path" => 1,
));
}
}