You are here

function xhprof_xhprof_enable in XHProf 6

Same name and namespace in other branches
  1. 7 xhprof.module \xhprof_xhprof_enable()

Conditionally enable XHProf profiling.

1 call to xhprof_xhprof_enable()
xhprof_boot in ./xhprof.module
Implementation of hook_boot(). Runs even for cached pages.

File

./xhprof.module, line 84

Code

function xhprof_xhprof_enable() {
  if (xhprof_is_enabled()) {

    // @todo: consider a variable per-flag instead.
    xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
    return TRUE;
  }
  else {
    return FALSE;
  }
}