Show
Ignore:
Timestamp:
10/05/2007 01:15:08 AM (14 months ago)
Author:
Shadowhand
Message:

Cleaned up Profiler and related files.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Database.php

    r655 r658  
    3030class Database_Core { 
    3131 
     32        // Global benchmark 
     33        public static $benchmarks = array(); 
     34 
    3235        // Configuration 
    33         protected $config  = array 
     36        protected $config = array 
    3437        ( 
     38                'show_errors'   => TRUE, 
     39                'benchmark'     => TRUE, 
     40                'persistent'    => FALSE, 
    3541                'connection'    => '', 
    36                 'persistent'    => FALSE, 
    37                 'show_errors'   => TRUE, 
    3842                'character_set' => 'utf8', 
    39                 'table_prefix'  => '' 
     43                'table_prefix'  => '', 
     44                'object'        => TRUE 
    4045        ); 
    4146 
     
    5964        protected $connected  = FALSE; 
    6065        protected $last_query = ''; 
    61         public $benchmark  = array(); 
    6266 
    6367        /** 
     
    474478                $stop = microtime(TRUE); 
    475479 
    476                 // benchmark the query 
    477                 $this->benchmark[] = array('query' => $sql, 'time' => $stop - $start); 
     480                if ($this->config['benchmark'] == TRUE) 
     481                { 
     482                        // Benchmark the query 
     483                        self::$benchmarks[] = array('query' => $sql, 'time' => $stop - $start); 
     484                } 
    478485 
    479486                $this->reset_select();