00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 if (!defined('ADODB_DIR')) die();
00017
00018
00019
00020
00021
00022 class perf_informix extends adodb_perf{
00023
00024
00025
00026 var $createTableSQL = "CREATE TABLE adodb_logsql (
00027 created datetime year to second NOT NULL,
00028 sql0 varchar(250) NOT NULL,
00029 sql1 varchar(255) NOT NULL,
00030 params varchar(255) NOT NULL,
00031 tracer varchar(255) NOT NULL,
00032 timer decimal(16,6) NOT NULL
00033 )";
00034
00035 var $tablesSQL = "select a.tabname tablename, ti_nptotal*2 size_in_k, ti_nextns extents, ti_nrows records from systables c, sysmaster:systabnames a, sysmaster:systabinfo b where c.tabname not matches 'sys*' and c.partnum = a.partnum and c.partnum = b.ti_partnum";
00036
00037 var $settings = array(
00038 'Ratios',
00039 'data cache hit ratio' => array('RATIOH',
00040 "select round((1-(wt.value / (rd.value + wr.value)))*100,2)
00041 from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
00042 where rd.name = 'pagreads' and
00043 wr.name = 'pagwrites' and
00044 wt.name = 'buffwts'",
00045 '=WarnCacheRatio'),
00046 'IO',
00047 'data reads' => array('IO',
00048 "select value from sysmaster:sysprofile where name='pagreads'",
00049 'Page reads'),
00050
00051 'data writes' => array('IO',
00052 "select value from sysmaster:sysprofile where name='pagwrites'",
00053 'Page writes'),
00054
00055 'Connections',
00056 'current connections' => array('SESS',
00057 'select count(*) from sysmaster:syssessions',
00058 'Number of sessions'),
00059
00060 false
00061
00062 );
00063
00064 function perf_informix(&$conn)
00065 {
00066 $this->conn =& $conn;
00067 }
00068
00069 }
00070 ?>