Migrated fax/scan options from global.php to Administration => Globals.
[openemr.git] / library / adodb / perf / perf-informix.inc.php
blobb6ac4492835826c1d7ffb1c503e80679827d1ffd
1 <?php
2 /*
3 V4.20 22 Feb 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.
4 Released under both BSD license and Lesser GPL library license.
5 Whenever there is any discrepancy between the two licenses,
6 the BSD license will take precedence. See License.txt.
7 Set tabs to 4 for best viewing.
9 Latest version is available at http://php.weblogs.com/
11 Library for basic performance monitoring and tuning
16 // Thx to Fernando Ortiz, mailto:fortiz#lacorona.com.mx
17 // With info taken from http://www.oninit.com/oninit/sysmaster/index.html
19 class perf_informix extends adodb_perf{
21 // Maximum size on varchar upto 9.30 255 chars
22 // better truncate varchar to 255 than char(4000) ?
23 var $createTableSQL = "CREATE TABLE adodb_logsql (
24 created datetime year to second NOT NULL,
25 sql0 varchar(250) NOT NULL,
26 sql1 varchar(255) NOT NULL,
27 params varchar(255) NOT NULL,
28 tracer varchar(255) NOT NULL,
29 timer decimal(16,6) NOT NULL
30 )";
32 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";
34 var $settings = array(
35 'Ratios',
36 'data cache hit ratio' => array('RATIOH',
37 "select round((1-(wt.value / (rd.value + wr.value)))*100,2)
38 from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
39 where rd.name = 'pagreads' and
40 wr.name = 'pagwrites' and
41 wt.name = 'buffwts'",
42 '=WarnCacheRatio'),
43 'IO',
44 'data reads' => array('IO',
45 "select value from sysmaster:sysprofile where name='pagreads'",
46 'Page reads'),
48 'data writes' => array('IO',
49 "select value from sysmaster:sysprofile where name='pagwrites'",
50 'Page writes'),
52 'Connections',
53 'current connections' => array('SESS',
54 'select count(*) from sysmaster:syssessions',
55 'Number of sessions'),
57 false
61 function perf_informix(&$conn)
63 $this->conn =& $conn;