Permet d'activer xhprof
This commit is contained in:
parent
ca692da0f7
commit
2583bc73f2
|
@ -388,6 +388,8 @@ bureau/admin/styles/style.css -text
|
|||
bureau/admin/tempovars.php -text
|
||||
bureau/admin/vm.php -text
|
||||
bureau/admin/webmail-redirect.php -text
|
||||
bureau/admin/xhprof_footer.php -text
|
||||
bureau/admin/xhprof_header.php -text
|
||||
bureau/class/config.php -text
|
||||
bureau/class/config_nochk.php -text
|
||||
bureau/class/db_mysql.php -text
|
||||
|
|
|
@ -10,5 +10,6 @@ if ( isset($debug_alternc) && $debug_alternc->status ) {
|
|||
</body>
|
||||
</html>
|
||||
<?php
|
||||
require_once("xhprof_footer.php");
|
||||
exit(); // case of include('foot.php');
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
if ( (extension_loaded('xhprof')) && DO_XHPROF_STATS ) {
|
||||
$profiler_namespace = 'alternc'; // namespace for your application
|
||||
$xhprof_data = xhprof_disable();
|
||||
$xhprof_runs = new XHProfRuns_Default();
|
||||
$run_id = $xhprof_runs->save_run($xhprof_data, $profiler_namespace);
|
||||
|
||||
// url to the XHProf UI libraries (change the host name and path)
|
||||
$profiler_url = sprintf('/xhprof/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace);
|
||||
echo '<p><h3><a href="'. $profiler_url .'" target="_blank">Profiler output</a></h3></p>';
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
if ( (extension_loaded('xhprof')) && DO_XHPROF_STATS ) {
|
||||
include_once '/usr/share/php/xhprof_lib/utils/xhprof_lib.php';
|
||||
include_once '/usr/share/php/xhprof_lib/utils/xhprof_runs.php';
|
||||
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
|
||||
}
|
||||
?>
|
|
@ -28,6 +28,9 @@
|
|||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
define('DO_XHPROF_STATS', FALSE);
|
||||
require_once('xhprof_header.php');
|
||||
|
||||
// To enable the display of the alternc debug error, do the following :
|
||||
// # touch /etc/alternc/alternc_display_php_error
|
||||
if (file_exists('/etc/alternc/alternc_display_php_error')) {
|
||||
|
|
Loading…
Reference in New Issue