From f6edc53e00677d5ec3859ab7fd50bb2c84fc2e6a Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 3 Oct 2006 05:28:09 +0000 Subject: --- system/codeigniter/CodeIgniter.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'system') diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php index 32c08c8f0..65ca35438 100644 --- a/system/codeigniter/CodeIgniter.php +++ b/system/codeigniter/CodeIgniter.php @@ -52,6 +52,7 @@ set_magic_quotes_runtime(0); // Kill magic quotes $BM =& _load_class('Benchmark'); $BM->mark('total_execution_time_start'); +$BM->mark('loading_time_base_clases_start'); /* * ------------------------------------------------------ @@ -130,6 +131,9 @@ _load_class('Controller', FALSE); require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT); +$BM->mark('loading_time_base_clases_end'); + + /* * ------------------------------------------------------ * Security check @@ -142,6 +146,7 @@ require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT); $class = $RTR->fetch_class(); $method = $RTR->fetch_method(); + if ( ! class_exists($class) OR $method == 'controller' OR substr($method, 0, 1) == '_' @@ -163,6 +168,10 @@ $EXT->_call_hook('pre_controller'); * Instantiate the controller and call requested method * ------------------------------------------------------ */ + +// Mark a start point so we can benchmark the controller +$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); + $CI = new $class(); if ($RTR->scaffolding_request === TRUE) @@ -180,11 +189,6 @@ else * ------------------------------------------------------ */ $EXT->_call_hook('post_controller_constructor'); - - if ($method == $class) - { - $method = 'index'; - } if (method_exists($CI, '_remap')) { @@ -203,6 +207,9 @@ else } } +// Mark a benchmark end point +$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); + /* * ------------------------------------------------------ * Is there a "post_controller" hook? -- cgit v1.2.3-24-g4f1b