C:/lib/adodb/perf/perf-informix.inc.php Quellcode

perf-informix.inc.php
gehe zur Dokumentation dieser Datei
1 <?php
2 /*
3 V5.19dev ??-???-2014 (c) 2000-2014 John Lim (jlim#natsoft.com). 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.
8 
9  Latest version is available at http://adodb.sourceforge.net
10 
11  Library for basic performance monitoring and tuning
12 
13 */
14 
15 // security - hide paths
16 if (!defined('ADODB_DIR')) die();
17 
18 //
19 // Thx to Fernando Ortiz, mailto:fortiz#lacorona.com.mx
20 // With info taken from http://www.oninit.com/oninit/sysmaster/index.html
21 //
22 class perf_informix extends adodb_perf{
23 
24  // Maximum size on varchar upto 9.30 255 chars
25  // better truncate varchar to 255 than char(4000) ?
26  var $createTableSQL = "CREATE TABLE adodb_logsql (
27  created datetime year to second NOT NULL,
28  sql0 varchar(250) NOT NULL,
29  sql1 varchar(255) NOT NULL,
30  params varchar(255) NOT NULL,
31  tracer varchar(255) NOT NULL,
32  timer decimal(16,6) NOT NULL
33  )";
34 
35  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";
36 
37  var $settings = array(
38  'Ratios',
39  'data cache hit ratio' => array('RATIOH',
40  "select round((1-(wt.value / (rd.value + wr.value)))*100,2)
41  from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
42  where rd.name = 'pagreads' and
43  wr.name = 'pagwrites' and
44  wt.name = 'buffwts'",
45  '=WarnCacheRatio'),
46  'IO',
47  'data reads' => array('IO',
48  "select value from sysmaster:sysprofile where name='pagreads'",
49  'Page reads'),
50 
51  'data writes' => array('IO',
52  "select value from sysmaster:sysprofile where name='pagwrites'",
53  'Page writes'),
54 
55  'Connections',
56  'current connections' => array('SESS',
57  'select count(*) from sysmaster:syssessions',
58  'Number of sessions'),
59 
60  false
61 
62  );
63 
64  function perf_informix(&$conn)
65  {
66  $this->conn = $conn;
67  }
68 
69 }
70 ?>




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.