summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/libraries/benchmark.html72
-rw-r--r--user_guide/libraries/output.html15
-rw-r--r--user_guide/libraries/profiler.html95
-rw-r--r--user_guide/nav/nav.js3
-rw-r--r--user_guide/toc.html3
5 files changed, 50 insertions, 138 deletions
diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html
index b8b0bfd32..8c1dc2c44 100644
--- a/user_guide/libraries/benchmark.html
+++ b/user_guide/libraries/benchmark.html
@@ -78,9 +78,9 @@ timing of the entire system execution to be shown.</p>
<ul>
<li><a href="#using">Using the Benchmark Class</a></li>
+<li><a href="#profiler">Profiling Your Benchmark Points</a></li>
<li><a href="#execution">Displaying Total Execution Time</a></li>
<li><a href="#memory">Displaying Memory Consumption</a></li>
-<li><a href="#profiler">Auto Profiler</a></li>
</ul>
@@ -98,15 +98,15 @@ timing of the entire system execution to be shown.</p>
<p>Here's an example using real code:</p>
-<code>$this->benchmark->mark('start');<br />
+<code>$this->benchmark->mark('code_start');<br />
<br />
// Some code happens here<br />
<br />
-$this->benchmark->mark('end');<br />
+$this->benchmark->mark('code_end');<br />
<br />
-echo $this->benchmark->elapsed_time('start', 'end');</code>
+echo $this->benchmark->elapsed_time('code_start', 'code_end');</code>
-<p><strong>Note:</strong> The words "start" and "end" are arbitrary. They are simply words used to set two markers. You can
+<p><strong>Note:</strong> The words "code_start" and "code_end" are arbitrary. They are simply words used to set two markers. You can
use any words you want, and you can set multiple sets of markers. Consider this example:</p>
<code>$this->benchmark->mark('dog');<br />
@@ -124,6 +124,32 @@ echo $this->benchmark->elapsed_time('cat', 'bird');<br />
echo $this->benchmark->elapsed_time('dog', 'bird');</code>
+<a name="profiler"></a>
+<h2>Profiling Your Benchmark Points</h2>
+
+<p>If you want your benchmark data to be available to the
+<a href="../general/profiling.html">Profiler</a> all of your marked points must be set up in pairs, and
+each mark point name must end with <kbd>_start</kbd> and <kbd>_end</kbd>.
+Each pair of points must otherwise be named identically. Example:</p>
+
+<code>
+$this->benchmark->mark('my_mark<kbd>_start</kbd>');<br />
+<br />
+// Some code happens here...<br />
+<br />
+$this->benchmark->mark('my_mark<kbd>_end</kbd>');
+<br /><br />
+
+$this->benchmark->mark('another_mark<kbd>_start</kbd>');<br />
+<br />
+// Some more code happens here...<br />
+<br />
+$this->benchmark->mark('another_mark<kbd>_end</kbd>');
+
+<p>Please read the <a href="../general/profiling.html">Profiler page</a> for more information.</p>
+
+
+
<a name="execution"></a>
<h2>Displaying Total Execution Time</h2>
@@ -155,42 +181,6 @@ system using the following code in one of your view file:</p>
<code>{memory_usage}</code>
-<a name="profiler"></a>
-<h2>Auto Profiler</h2>
-
-<p>When the "auto profiler" is enabled, you'll see a report printed at the bottom of your pages containing a list of
-execution times for all benchmarks you have set throughout your application. This information can help you optimize your program.</p>
-
-<p class="important"><strong>Note:</strong> Even though this is a feature of the Benchmark class you will enable it from the Output class as indicated below.</p>
-
-<p>To enable the profiler place the the following function anywhere within your Controllers:</p>
-<code>$this->output->enable_profiler(TRUE);</code>
-
-<p>When enabled you'll see a table of execution times at the bottom of your pages.</p>
-
-<p>To disable the profiler you will use:</p>
-<code>$this->output->enable_profiler(FALSE);</code>
-
-<p>Important: In order to use this feature all of your marked points must end with <kbd>_start</kbd> and <kbd>_end</kbd>, and
-each pair of points must otherwise be named identically. Example:</p>
-
-<code>
-$this->benchmark->mark('my_mark<kbd>_start</kbd>');<br />
-<br />
-// Some code happens here...<br />
-<br />
-$this->benchmark->mark('my_mark<kbd>_end</kbd>');
-<br /><br />
-
-$this->benchmark->mark('another_mark<kbd>_start</kbd>');<br />
-<br />
-// Some more code happens here...<br />
-<br />
-$this->benchmark->mark('another_mark<kbd>_end</kbd>');
-
-</code>
-
-
</div>
diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html
index adc8fb58e..ad6a53d8f 100644
--- a/user_guide/libraries/output.html
+++ b/user_guide/libraries/output.html
@@ -105,6 +105,21 @@ $this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);<br
$this->output->set_header("Pragma: no-cache"); </code>
+<h2>$this->output->enable_profiler();</h2>
+
+<p>Permits you to enable/disable the <a href="../general/profiling.html">Profiler</a>, which will display benchmark and other data
+at the bottom of your pages for debugging and optimization purposes.</p>
+
+<p>To enable the profiler place the the following function anywhere within your <a href="controllers.html">Controller</a> functions:</p>
+<code>$this->output->enable_profiler(TRUE);</code>
+
+<p>When enabled a report will be generated and inserted at the bottom of your pages.</p>
+
+<p>To disable the profiler you will use:</p>
+<code>$this->output->enable_profiler(FALSE);</code>
+
+
+
</div>
<!-- END CONTENT -->
diff --git a/user_guide/libraries/profiler.html b/user_guide/libraries/profiler.html
deleted file mode 100644
index 2b162be0b..000000000
--- a/user_guide/libraries/profiler.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-
-<title>Code Igniter User Guide</title>
-
-<style type='text/css' media='all'>@import url('../userguide.css');</style>
-<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
-
-<script type="text/javascript" src="../nav/nav.js"></script>
-<script type="text/javascript" src="../nav/prototype.lite.js"></script>
-<script type="text/javascript" src="../nav/moo.fx.js"></script>
-<script type="text/javascript">
-window.onload = function() {
- myHeight = new fx.Height('nav', {duration: 400});
- myHeight.hide();
-}
-</script>
-
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta http-equiv='expires' content='-1' />
-<meta http-equiv= 'pragma' content='no-cache' />
-<meta name='robots' content='all' />
-<meta name='author' content='Rick Ellis' />
-<meta name='description' content='Code Igniter User Guide' />
-
-</head>
-<body>
-
-<!-- START NAVIGATION -->
-<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
-<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
-<div id="masthead">
-<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
-<tr>
-<td><h1>Code Igniter User Guide Version 1.5.0</h1></td>
-<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
-</tr>
-</table>
-</div>
-<!-- END NAVIGATION -->
-
-
-<!-- START BREADCRUMB -->
-<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
-<tr>
-<td id="breadcrumb">
-<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
-<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
-Profiler Class
-</td>
-<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
-</tr>
-</table>
-<!-- END BREADCRUMB -->
-
-<br clear="all" />
-
-
-<!-- START CONTENT -->
-<div id="content">
-
-
-
-
-<h1>Profiler Class</h1>
-
-<p>The Profiler Class enables you to display benchmark, query, POST data at the bottom of your pages during
-development in order to help with debugging and optimization.</p>
-
-
-<h2>Initializing the Class</h2>
-
-<p><strong>Important:</strong> This class does NOT need to be initialized. It is loaded automatically by the Output class if
-profiling is enabled as shown below.</p>
-
-
-
-</div>
-<!-- END CONTENT -->
-
-
-<div id="footer">
-<p>
-Previous Topic:&nbsp;&nbsp;<a href="parser.html">Parser Class</a>
-&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="sessions.html">Session Class</a>
-<p>
-<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js
index fc2d609a1..5afa28742 100644
--- a/user_guide/nav/nav.js
+++ b/user_guide/nav/nav.js
@@ -52,7 +52,8 @@ function create_menu(basepath)
'<li><a href="'+base+'general/scaffolding.html">Scaffolding</a></li>' +
'<li><a href="'+base+'general/routing.html">URI Routing</a></li>' +
'<li><a href="'+base+'general/errors.html">Error Handling</a></li>' +
- '<li><a href="'+base+'general/caching.html">Web Page Caching</a></li>' +
+ '<li><a href="'+base+'general/caching.html">Caching</a></li>' +
+ '<li><a href="'+base+'general/profiling.html">Profiling Your Application</a></li>' +
'<li><a href="'+base+'general/multiple_apps.html">Running Multiple Applications</a></li>' +
'<li><a href="'+base+'general/alternative_php.html">Alternative PHP Syntax</a></li>' +
'<li><a href="'+base+'general/security.html">Security</a></li>' +
diff --git a/user_guide/toc.html b/user_guide/toc.html
index f4675b9b5..d479aa19a 100644
--- a/user_guide/toc.html
+++ b/user_guide/toc.html
@@ -107,7 +107,8 @@ Table of Contents
<li><a href="./general/scaffolding.html">Scaffolding</a></li>
<li><a href="./general/routing.html">URI Routing</a></li>
<li><a href="./general/errors.html">Error Handling</a></li>
- <li><a href="./general/caching.html">Web Page Caching</a></li>
+ <li><a href="./general/caching.html">Caching</a></li>
+ <li><a href="./general/profiling.html">Profiling Your Application</a></li>
<li><a href="./general/multiple_apps.html">Running Multiple Applications</a></li>
<li><a href="./general/alternative_php.html">Alternative PHP Syntax</a></li>
<li><a href="./general/security.html">Security</a></li>