Documentation TYPO3 par Ameos |
00001 <?php 00002 /* 00003 V4.93 10 Oct 2006 (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved. 00004 Released under both BSD license and Lesser GPL library license. 00005 Whenever there is any discrepancy between the two licenses, 00006 the BSD license will take precedence. See License.txt. 00007 Set tabs to 4 for best viewing. 00008 00009 Latest version is available at http://adodb.sourceforge.net 00010 00011 Library for basic performance monitoring and tuning 00012 00013 */ 00014 00015 // security - hide paths 00016 if (!defined('ADODB_DIR')) die(); 00017 00018 // 00019 // Thx to Fernando Ortiz, mailto:fortiz#lacorona.com.mx 00020 // With info taken from http://www.oninit.com/oninit/sysmaster/index.html 00021 // 00022 class perf_informix extends adodb_perf{ 00023 00024 // Maximum size on varchar upto 9.30 255 chars 00025 // better truncate varchar to 255 than char(4000) ? 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 ?>