[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/adodb/perf/ -> perf-informix.inc.php (source)

   1  <?php
   2  /*
   3  @version   v5.20.3  01-Jan-2016
   4  @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
   5  @copyright (c) 2014      Damien Regad, Mark Newnham and the ADOdb community
   6    Released under both BSD license and Lesser GPL library license.
   7    Whenever there is any discrepancy between the two licenses,
   8    the BSD license will take precedence. See License.txt.
   9    Set tabs to 4 for best viewing.
  10  
  11    Latest version is available at http://adodb.sourceforge.net
  12  
  13    Library for basic performance monitoring and tuning
  14  
  15  */
  16  
  17  // security - hide paths
  18  if (!defined('ADODB_DIR')) die();
  19  
  20  //
  21  // Thx to  Fernando Ortiz, mailto:fortiz#lacorona.com.mx
  22  // With info taken from http://www.oninit.com/oninit/sysmaster/index.html
  23  //
  24  class perf_informix extends adodb_perf{
  25  
  26      // Maximum size on varchar upto 9.30 255 chars
  27      // better truncate varchar to 255 than char(4000) ?
  28      var $createTableSQL = "CREATE TABLE adodb_logsql (
  29          created datetime year to second NOT NULL,
  30          sql0 varchar(250) NOT NULL,
  31          sql1 varchar(255) NOT NULL,
  32          params varchar(255) NOT NULL,
  33          tracer varchar(255) NOT NULL,
  34          timer decimal(16,6) NOT NULL
  35      )";
  36  
  37      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";
  38  
  39      var $settings = array(
  40      'Ratios',
  41          'data cache hit ratio' => array('RATIOH',
  42          "select round((1-(wt.value / (rd.value + wr.value)))*100,2)
  43          from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
  44          where rd.name = 'pagreads' and
  45          wr.name = 'pagwrites' and
  46          wt.name = 'buffwts'",
  47          '=WarnCacheRatio'),
  48      'IO',
  49          'data reads' => array('IO',
  50          "select value from sysmaster:sysprofile where name='pagreads'",
  51          'Page reads'),
  52  
  53          'data writes' => array('IO',
  54          "select value from sysmaster:sysprofile where name='pagwrites'",
  55          'Page writes'),
  56  
  57      'Connections',
  58          'current connections' => array('SESS',
  59          'select count(*) from sysmaster:syssessions',
  60          'Number of sessions'),
  61  
  62      false
  63  
  64      );
  65  
  66  	function __construct(&$conn)
  67      {
  68          $this->conn = $conn;
  69      }
  70  
  71  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1