ADOdb Lite Commands

| ADOdb Lite Performance Monitor

ADOdb Lite Performance Monitor

The ADOdb Lite Performance Monitor is a very, very early beta and created by Pádraic Brady AKA Maugrim the Reaper. We know there are still problems with the performance monitor and Pádraic is working on them. There are apparently some problems with MySql 4.x but it seems to work just fine with MySql 5.x. Currently the only database drivers supported are mysql, mysqli and mysqlt.

Performance Monitor Example

include_once('adodb_lite/adodb.inc.php');
session_start(); # session variables required for monitoring
$conn = ADONewConnection('mysqli://user:passwd@localhost/testdatabase#perfmon'); // PEAR compat DSN specifying driver, credentials and module
$perf =& NewPerfMonitor($conn); // BC only, $perf is a simple reference to $conn
$perf->UI($pollsecs=5);

Key difference: "perfmon" module MUST be specified when loading ADOdb-Lite. The NewPerfMonitor() is for backwards compatibility only, and is not required. $conn already contains the module methods, $perf is a simple reference to $conn. All other actions such as enabling SQL logging and setting a logging table are the same as ADOdb.
A better method for invoking the Performance Monitor is to edit the adodb.config.php file and add permon to the module list.

$modules = "perfmon";

This will automatically load the performance module. By adding perfmon to the module list you do not need to edit any of your connection data. It will also make it easier to turn on and off the performance module.

Copyright ©2005, 2006 Mark Dickenson