You are here

function xhprof_shutdown in XHProf 7

Same name and namespace in other branches
  1. 6 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 149

Code

function xhprof_shutdown() {
  global $xhprof_run_id;

  // Exit here if this module is being disabled.
  if (!module_exists('xhprof')) {
    return;
  }
  if (xhprof_is_enabled() && ($xhprof_run_id = xhprof_shutdown_xhprof())) {

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