fetchField(); require_once '/home/catch/www/xhprof-0.9.2/xhprof_lib/utils/xhprof_lib.php'; require_once '/home/catch/www/xhprof-0.9.2/xhprof_lib/utils/xhprof_runs.php'; xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); $nid = db_select('node') ->fields('node', array('nid')) ->condition('nid', 1) ->execute() ->fetchField(); $profiler_namespace = 'd7'; $xhprof_data = xhprof_disable(); $xhprof_runs = new XHProfRuns_Default(); $run_id = $xhprof_runs->save_run($xhprof_data, $profiler_namespace); $profiler_url = sprintf('http://xhprof.localhost:9090/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace); print 'Profiler output';