You are here

function xhprof_shutdown in XHProf 6

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

See xhprof_start() which registers this function as a shutdown function.

1 string reference to 'xhprof_shutdown'
xhprof_boot in ./xhprof.module
Implementation of hook_boot(). Runs even for cached pages.

File

./xhprof.module, line 130

Code

function xhprof_shutdown() {
  global $xhprof_run_id;
  if (xhprof_is_enabled() && ($xhprof_run_id = xhprof_shutdown_xhprof())) {

    // Register the real shutdown function so it runs later than other shutdown functions.
    register_shutdown_function('xhprof_shutdown_real');
    if (function_exists('drush_log')) {
      drush_log('xhprof link: ' . xhprof_build_link($xhprof_run_id, 'url'), 'notice');
    }
  }
}