Advertisement
IchHabRecht

[PHP] xhProf profiling

Feb 10th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. // start profiling
  2. include_once "C:/Users/Nicole/Version Control/Git/localhost/xhprof/xhprof_lib/utils/xhprof_lib.php";
  3. include_once "C:/Users/Nicole/Version Control/Git/localhost/xhprof/xhprof_lib/utils/xhprof_runs.php";
  4. xhprof_enable();
  5.  
  6. // stop profiler
  7. $appName = 'XXX';
  8. $xhProfData = xhprof_disable();
  9. $xhProfRuns = new XHProfRuns_Default();
  10. $runId = $xhProfRuns->save_run($xhProfData, $appName);
  11. $xhProfUrl = sprintf('http://xhprof.local/index.php?run=%s&source=%s', $runId, $appName);
  12. echo '<a href="'. $xhProfUrl .'" target="_blank">Profiler output</a>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement