You are here

function xhprof_shutdown_xhprof in XHProf 6

Same name and namespace in other branches
  1. 7 xhprof.module \xhprof_shutdown_xhprof()
1 call to xhprof_shutdown_xhprof()
xhprof_shutdown in ./xhprof.module
See xhprof_start() which registers this function as a shutdown function.

File

./xhprof.module, line 171

Code

function xhprof_shutdown_xhprof() {
  $namespace = variable_get('site_name', '');

  // namespace for your application
  $xhprof_data = xhprof_disable();
  $xhprof_data['path'] = isset($_GET['q']) ? $_GET['q'] : '';
  $class = variable_get('xhprof_default_class', 'XHProfRunsFile');
  $xhprof_runs = new $class();
  return $xhprof_runs
    ->save_run($xhprof_data, $namespace);
}