Changeset 172 for trunk/lib/App.inc.php
- Timestamp:
- Jun 15, 2006 7:59:45 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r170 r172 156 156 // Initialize default parameters. 157 157 $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'); 158 163 } 159 164 … … 334 339 restore_include_path(); 335 340 $this->running = false; 341 $num_queries = 0; 336 342 if (true === $this->getParam('enable_db')) { 343 $num_queries = $this->db->numQueries(); 337 344 $this->db->close(); 338 345 } 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__); 339 348 } 340 349
Note: See TracChangeset
for help on using the changeset viewer.