summaryrefslogtreecommitdiff
path: root/admin/db_performance.php
blob: c450b50a30b2c90f9e0a30e775a65fe39ae7ad0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

	require_once( '../../bit_setup_inc.php' );

	if (!$gBitUser->isAdmin()) {
		$gBitSmarty->assign('msg', tra("You dont have permission to use this feature"));
		$gBitSystem->display( 'error.tpl' , NULL, array( 'display_mode' => 'admin' ));
		die;
	}

	if( defined( 'DB_PERFORMANCE_STATS' ) && constant( 'DB_PERFORMANCE_STATS' ) ) {
?>

<h1 style="color:red;">Performance Monitoring is Active!</h1>
<p>Database performance monitoring is a low level, and intensive task. <b>It should not be left on for extended periods of time.</b>

<?php
	} else {
?>

<p style="color:red;">To activate database performance, please add to you kernel/config_inc.php:<br>
<code>define( 'DB_PERFORMANCE_STATS', TRUE ); </code>

<?php
	}
?>
For more information, see the <a href="http://phplens.com/lens/adodb/docs-perf.htm">ADODB documentation</a>
</p>

<?php
	$perf =& NewPerfMonitor( $gBitSystem->mDb->mDb );
	$perf->UI($pollsecs=5);
?>