From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- vendor/adodb/adodb-php/tests/test-perf.php | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 vendor/adodb/adodb-php/tests/test-perf.php (limited to 'vendor/adodb/adodb-php/tests/test-perf.php') diff --git a/vendor/adodb/adodb-php/tests/test-perf.php b/vendor/adodb/adodb-php/tests/test-perf.php new file mode 100644 index 0000000..62465be --- /dev/null +++ b/vendor/adodb/adodb-php/tests/test-perf.php @@ -0,0 +1,48 @@ + $v) { + if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k; + } +} + +if (isset($_SESSION['_db'])) { + $_db = $_SESSION['_db']; + $_GET[$_db] = 1; + $$_db = 1; +} + +echo "

Performance Monitoring

"; +include_once('testdatabases.inc.php'); + + +function testdb($db) +{ + if (!$db) return; + echo "";print_r($db->ServerInfo()); echo " user=".$db->user.""; + + $perf = NewPerfMonitor($db); + + # unit tests + if (0) { + //$DB->debug=1; + echo "Data Cache Size=".$perf->DBParameter('data cache size').'

'; + echo $perf->HealthCheck(); + echo($perf->SuspiciousSQL()); + echo($perf->ExpensiveSQL()); + echo($perf->InvalidSQL()); + echo $perf->Tables(); + + echo "

";
+		echo $perf->HealthCheckCLI();
+		$perf->Poll(3);
+		die();
+	}
+
+	if ($perf) $perf->UI(3);
+}
-- 
cgit v1.2.3-70-g09d2