diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index a4f18b0..32c08c8 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -51,7 +51,7 @@
  */
 
 $BM =& _load_class('Benchmark');
-$BM->mark('code_igniter_start');
+$BM->mark('total_execution_time_start');
 
 /*
  * ------------------------------------------------------
diff --git a/system/libraries/Benchmark.php b/system/libraries/Benchmark.php
index d8dd903..feedbf5 100644
--- a/system/libraries/Benchmark.php
+++ b/system/libraries/Benchmark.php
@@ -86,6 +86,38 @@
 	// --------------------------------------------------------------------
 
 	/**
+	 * Auto Profiler
+	 *
+	 * This function cycles through the entire array of mark points and
+	 * matches any two points that are named identially (ending in "_start"
+	 * and "_end" respectively).  It then compiles the execution times for
+	 * all points and returns it as an array
+	 *
+	 * @access	public
+	 * @return	array
+	 */
+ 	function auto_profiler()
+ 	{  		
+ 		$marker_keys = array_reverse(array_keys($this->marker));
+ 
+  		$times = array();
+ 		foreach ($marker_keys as $val)
+ 		{
+ 			if (preg_match("/(.+?)_start/i", $val, $match))
+ 			{ 			
+ 				if (isset($this->marker[$match[1].'_end']))
+ 				{
+ 					$times[$match[1]] = $this->elapsed_time($val, $match[1].'_end');
+ 				}
+ 			}
+ 		}
+ 	
+ 		return $times;
+ 	}
+ 	
+	// --------------------------------------------------------------------
+
+	/**
 	 * Memory Usage
 	 *
 	 * This function returns the {memory_usage} pseudo-variable.
diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index 1c3f0d6..b5b7c9e 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.php
@@ -31,6 +31,7 @@
 	var $final_output;
 	var $cache_expiration = 0;
 	var $headers = array();
+	var $enable_profiler = FALSE;
 
 	function CI_Output()
 	{
@@ -90,6 +91,20 @@
 	// --------------------------------------------------------------------
 	
 	/**
+	 * Enable/disable Profiler 
+	 *
+	 * @access	public
+	 * @param	bool
+	 * @return	void
+	 */	
+	function enable_profiler($val = TRUE)
+	{
+		$this->enable_profiler = (is_bool($val)) ? $val : TRUE;
+	}
+	
+	// --------------------------------------------------------------------
+	
+	/**
 	 * Set Cache 
 	 *
 	 * @access	public
@@ -123,7 +138,7 @@
 	 */		
 	function _display($output = '')
 	{	
-		// Note:  We can't use $obj =& _get_instance() since this function 
+		// Note:  We can't use $obj =& get_instance() since this function 
 		// is sometimes called by the caching mechanism, which happens before 
 		// it's available.  Instead we'll use globals...
 		global $BM, $CFG;
@@ -141,7 +156,7 @@
 
 		// Parse out the elapsed time and memory usage, and 
 		// swap the pseudo-variables with the data
-		$elapsed = $BM->elapsed_time('code_igniter_start', 'code_igniter_end');		
+		$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');		
 		$memory	 = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
 
 		$output = str_replace('{memory_usage}', $memory, $output);		
@@ -166,14 +181,28 @@
 			{
 				@header($header);
 			}
-		}
+		}		
 		
 		// Send the finalized output either directly
 		// to the browser or to the user's _output() 
 		// function if it exists
-		if (function_exists('_get_instance') AND method_exists($obj, '_output'))
+		if (function_exists('get_instance'))
 		{
-			$obj->_output($output);
+			$obj =& get_instance();
+		
+			if ($this->enable_profiler == TRUE)
+			{
+				$output .= $this->_run_profiler();
+			}
+		
+			if (method_exists($obj, '_output'))
+			{
+				$obj->_output($output);
+			}
+			else
+			{
+				echo $output;  // Send it to the browser!
+			}
 		}
 		else
 		{		
@@ -295,6 +324,37 @@
 		return TRUE;
 	}
 
+	// --------------------------------------------------------------------
+	
+	/**
+	 * Run the Auto-profiler
+	 *
+	 * @access	private
+	 * @return	string
+	 */	
+	function _run_profiler()
+	{
+		$obj =& get_instance();
+		
+		$profile = $obj->benchmark->auto_profiler();
+		
+		$output = '';
+		if (count($profile) > 0)
+		{
+			$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0'>\n";
+			
+			foreach ($profile as $key => $val)
+			{
+				$key = ucwords(str_replace(array('_', '-'), ' ', $key));
+				$output .= "<tr><td><strong>".$key."</strong></td><td>".$val."</td></tr>\n";
+			}
+			
+			$output .= "</table>\n";
+		}
+		
+		return $output;
+	}
+
 }
 // END Output Class
 ?>
\ No newline at end of file