You are here

function xhprof_mongodb_install in XHProf 6

Same name and namespace in other branches
  1. 8 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()
  2. 7 modules/xhprof_mongodb/xhprof_mongodb.install \xhprof_mongodb_install()

Implementation of hook_install().

File

modules/xhprof_mongodb/xhprof_mongodb.install, line 30
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,
    ));
  }
}