footer.php 587 B

123456789101112
  1. <?php
  2. if (extension_loaded('xhprof')) {
  3. $profiler_namespace = 'chamilolms'; // namespace for your application
  4. $xhprof_data = xhprof_disable();
  5. $xhprof_runs = new XHProfRuns_Default();
  6. $run_id = $xhprof_runs->save_run($xhprof_data, $profiler_namespace);
  7. // url to the XHProf UI libraries (change the host name and path)
  8. $profiler_url = sprintf('http://my.chamilo.net/tests/xhprof/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace);
  9. $xhprof = '<a href="'. $profiler_url .'" target="_blank">Profiler output</a>';
  10. error_log($run_id);
  11. }