You are here

function devel_xhprof_enable in Devel 6

1 call to devel_xhprof_enable()
devel_boot in ./devel.module
Implementation of hook_boot(). Runs even for cached pages.

File

./devel.module, line 432

Code

function devel_xhprof_enable() {
  if (extension_loaded('xhprof') && variable_get('devel_xhprof_enabled', FALSE)) {
    if (($path = variable_get('devel_xhprof_directory', '')) && (include_once $path . '/xhprof_lib/utils/xhprof_lib.php') && (include_once $path . '/xhprof_lib/utils/xhprof_runs.php')) {

      // @todo: consider a variable per-flag instead.
      xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
      register_shutdown_function('devel_shutdown_xhprof_drush');
    }
  }
}