Changeset 172 for trunk/lib/App.inc.php


Ignore:
Timestamp:
Jun 15, 2006 7:59:45 PM (18 years ago)
Author:
scdev
Message:

Q - added caching to ACL, and flush command to acl.cli.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r170 r172  
    156156        // Initialize default parameters.
    157157        $this->_params = array_merge($this->_params, $this->_param_defaults);
     158       
     159        // Begin timing script.
     160        require_once dirname(__FILE__) . '/ScriptTimer.inc.php';
     161        $this->timer = new ScriptTimer();
     162        $this->timer->start('_app');
    158163    }
    159164
     
    334339        restore_include_path();
    335340        $this->running = false;
     341        $num_queries = 0;
    336342        if (true === $this->getParam('enable_db')) {
     343            $num_queries = $this->db->numQueries();
    337344            $this->db->close();
    338345        }
     346        $this->timer->stop('_app');
     347        $this->logMsg(sprintf('Script ended gracefully. Execution time: %s. Number of db queries: %s.', $this->timer->getTime('_app'), $num_queries), LOG_DEBUG, __FILE__, __LINE__);
    339348    }
    340349
Note: See TracChangeset for help on using the changeset viewer.