footer.php 641 B

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