From ed1f1ae8486e200f1c5c447bf5b72f54cd15d161 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sun, 21 Sep 2008 19:34:01 +0000 Subject: Added controller class/method info to profiler --- system/libraries/Profiler.php | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 94eef39a1..55ad1e3c1 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -6,7 +6,7 @@ * * @package CodeIgniter * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008, EllisLab, Inc. + * @copyright Copyright (c) 2006, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 @@ -230,7 +230,6 @@ class CI_Profiler { $key = "'".$key."'"; } -// $output .= "$_POST[".$key."]  ".htmlspecialchars(stripslashes($val))."\n"; $output .= "$_POST[".$key."]   "; if (is_array($val)) { @@ -282,6 +281,29 @@ class CI_Profiler { // -------------------------------------------------------------------- + /** + * Show the controller and function that were called + * + * @access private + * @return string + */ + function _compile_controller_info() + { + $output = "\n\n"; + $output .= '
'; + $output .= "\n"; + $output .= '  '.$this->CI->lang->line('profiler_controller_info').'  '; + $output .= "\n"; + + $output .= "
".$this->CI->router->fetch_class()."/".$this->CI->router->fetch_method()."
"; + + + $output .= "
"; + + return $output; + } + // -------------------------------------------------------------------- + /** * Compile memory usage * @@ -293,18 +315,18 @@ class CI_Profiler { function _compile_memory_usage() { $output = "\n\n"; - $output .= '
'; + $output .= '
'; $output .= "\n"; - $output .= '  '.$this->CI->lang->line('profiler_memory_usage').'  '; + $output .= '  '.$this->CI->lang->line('profiler_memory_usage').'  '; $output .= "\n"; if (function_exists('memory_get_usage') && ($usage = memory_get_usage()) != '') { - $output .= "
".number_format($usage).' bytes
'; + $output .= "
".number_format($usage).' bytes
'; } else { - $output .= "
".$this->CI->lang->line('profiler_no_memory_usage')."
"; + $output .= "
".$this->CI->lang->line('profiler_no_memory_usage')."
"; } $output .= "
"; @@ -322,12 +344,13 @@ class CI_Profiler { */ function run() { - $output = '
'; - $output .= "
"; - + $output = '
'; + $output .= "
"; + + $output .= $this->_compile_uri_string(); + $output .= $this->_compile_controller_info(); $output .= $this->_compile_memory_usage(); $output .= $this->_compile_benchmarks(); - $output .= $this->_compile_uri_string(); $output .= $this->_compile_get(); $output .= $this->_compile_post(); $output .= $this->_compile_queries(); -- cgit v1.2.3-24-g4f1b