More efficient querying of courses (from Martin Langhoff)
[moodle.git] / admin / dbperformance.php
blob89377ce434a6d3da65c5d7c8f8129b9b5d8d6539
1 <?PHP // $Id$
2 // dbperformance.php - shows latest ADOdb stats for the current server
4 require_once("../config.php");
6 require_login();
8 if (!isadmin()) {
9 error("Only the admin can use this page");
12 $strdatabaseperformance = get_string("databaseperformance");
13 $stradministration = get_string("administration");
14 $site = get_site();
16 if (isset($topframe)) {
17 print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
18 "<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> Database performance");
19 exit;
22 if (isset($bottomframe) or isset($_GET['do'])) {
23 $perf =&NewPerfMonitor($db);
24 $perf->UI($pollsecs=5);
25 exit;
29 <head>
30 <title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
31 </head>
33 <frameset rows="80,*">
34 <frame src="dbperformance.php?topframe=true">
35 <frame src="dbperformance.php?bottomframe=true">
36 </frameset>