function xh_drush_exit

8.0.x xh.drush.inc xh_drush_exit()
7.x xh.drush.inc xh_drush_exit()
master xh.drush.inc xh_drush_exit()

Implements hook_drush_exit().

File

commands/xh.drush.inc, line 53

Code

function xh_drush_exit() {
  if (xh_enabled()) {
    $args = func_get_args();
    $namespace = 'Drush'; // variable_get('site_name', '');
    $xhprof_data = xhprof_disable();
    $xhprof_runs = new XHProfRuns_Default();
    $run_id = $xhprof_runs->save_run($xhprof_data, $namespace);
    if ($url = xh_link($run_id)) {
      drush_log(dt('XHProf run saved. View report at !url', array('!url' => $url)), LogLevel::OK);
    }
  }
}