0
@@ -284,7 +284,7 @@ Learn about various tools facilitating benchmarking and profiling
0
-<div class="paragraph"><p>Performance testing is an integral part of the development cycle. It is very important that you don’t make your end users wait for too long before the page is completely loaded. Ensuring a ple
sant browsing experience to the end users and cutting cost of unnecessary hardwares is important for any web application.</p></div>
0
+<div class="paragraph"><p>Performance testing is an integral part of the development cycle. It is very important that you don’t make your end users wait for too long before the page is completely loaded. Ensuring a ple
asant browsing experience to the end users and cutting cost of unnecessary hardwares is important for any web application.</p></div>
0
<h2 id="_performance_test_cases">1. Performance Test Cases</h2>
0
@@ -418,7 +418,7 @@ http://www.gnu.org/software/src-highlite -->
0
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
0
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
0
<h3 id="_modes">1.3. Modes</h3>
0
-<div class="paragraph"><p>Performance tests can be run in two modes : Benchmarking and Prof
ling.</p></div>
0
+<div class="paragraph"><p>Performance tests can be run in two modes : Benchmarking and Prof
iling.</p></div>
0
<h4 id="_benchmarking">1.3.1. Benchmarking</h4>
0
<div class="paragraph"><p>Benchmarking helps find out how fast is a performance test. Each test case is run <tt>4 times</tt> in benchmarking mode.</p></div>
0
<div class="paragraph"><p>To run performance tests in benchmarking mode:</p></div>
0
@@ -429,7 +429,7 @@ http://www.lorenzobettini.it
0
http://www.gnu.org/software/src-highlite -->
0
<pre><tt>$ rake <span style="font-weight: bold"><span style="color: #0000FF">test</span></span><span style="color: #990000">:</span>benchmark</tt></pre></div></div>
0
<h4 id="_profiling">1.3.2. Profiling</h4>
0
-<div class="paragraph"><p>Profiling helps you introspect into a performance test and provide an in-depth picture of the slow and memory hung
y parts. Each Test case is run <tt>1 time</tt> in profiling mode.</p></div>
0
+<div class="paragraph"><p>Profiling helps you introspect into a performance test and provide an in-depth picture of the slow and memory hung
ry parts. Each Test case is run <tt>1 time</tt> in profiling mode.</p></div>
0
<div class="paragraph"><p>To run performance tests in profiling mode:</p></div>
0
<div class="listingblock">
0
<div class="content"><!-- Generator: GNU source-highlight 2.9
0
@@ -534,13 +534,13 @@ http://www.gnu.org/software/src-highlite -->
0
memory<span style="color: #990000">:</span> <span style="color: #993399">832.13</span> KB
0
objects<span style="color: #990000">:</span> <span style="color: #993399">7882</span></tt></pre></div></div>
0
<h5 id="_flat">Flat</h5>
0
-<div class="paragraph"><p>Flat output shows the total amount of time spent in each method. <a href="http://ruby-prof.rubyforge.org/files/examples/flat_txt.html">Check ruby prof documentation for a better expla
ination</a>.</p></div>
0
+<div class="paragraph"><p>Flat output shows the total amount of time spent in each method. <a href="http://ruby-prof.rubyforge.org/files/examples/flat_txt.html">Check ruby prof documentation for a better expla
nation</a>.</p></div>
0
<h5 id="_graph">Graph</h5>
0
-<div class="paragraph"><p>Graph output shows how long each method takes to run, which methods call it and which methods it calls. <a href="http://ruby-prof.rubyforge.org/files/examples/graph_txt.html">Check ruby prof documentation for a better expla
ination</a>.</p></div>
0
+<div class="paragraph"><p>Graph output shows how long each method takes to run, which methods call it and which methods it calls. <a href="http://ruby-prof.rubyforge.org/files/examples/graph_txt.html">Check ruby prof documentation for a better expla
nation</a>.</p></div>
0
<h5 id="_tree">Tree</h5>
0
<div class="paragraph"><p>Tree output is profiling information in calltree format for use by <a href="http://kcachegrind.sourceforge.net/html/Home.html">kcachegrind</a> and similar tools.</p></div>
0
<h3 id="_tuning_test_runs">1.6. Tuning Test Runs</h3>
0
-<div class="paragraph"><p>By default, each performance test is run <tt>4 times</tt> in benchmarking mode
l and <tt>1 time</tt> in profiling. However, test runs can easily be configured.</p></div>
0
+<div class="paragraph"><p>By default, each performance test is run <tt>4 times</tt> in benchmarking mode
and <tt>1 time</tt> in profiling. However, test runs can easily be configured.</p></div>
0
<div class="admonitionblock">
0
@@ -552,7 +552,7 @@ http://www.gnu.org/software/src-highlite -->
0
<h3 id="gc">1.7. Installing GC Patched Ruby</h3>
0
<div class="paragraph"><p>To get the best from Rails performance tests, you need to build a special Ruby binary with some super powers - <a href="http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch">GC patch</a> for measuring GC Runs/Time and memory/object allocation.</p></div>
0
<div class="paragraph"><p>The process is fairly straight forward. If you’ve never compiled a Ruby binary before, follow the following steps to build a ruby binary inside your home directory:</p></div>
0
-<h4 id="_inst
llation">1.7.1. Instllation</h4>
0
+<h4 id="_inst
allation">1.7.1. Installation</h4>
0
<div class="paragraph"><p>Compile Ruby and apply this <a href="http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch">GC Patch</a>:</p></div>
0
<h4 id="_download_and_extract">1.7.2. Download and Extract</h4>
0
<div class="listingblock">
0
@@ -592,7 +592,7 @@ alias gcrails='~/rubygc/bin/rails'</tt></pre>
0
<h4 id="_install_rubygems_and_dependency_gems">1.7.6. Install rubygems and dependency gems</h4>
0
<div class="paragraph"><p>Download <a href="http://rubyforge.org/projects/rubygems">Rubygems</a> and install it from source. Rubygem’s README file should have necessary installation instructions.</p></div>
0
-<div class="paragraph"><p>Additionally, install
a the following gems :</p></div>
0
+<div class="paragraph"><p>Additionally, install
the following gems :</p></div>
0
<div class="ulist"><ul>
0
@@ -648,7 +648,7 @@ http://www.gnu.org/software/src-highlite -->
0
http://www.lorenzobettini.it
0
http://www.gnu.org/software/src-highlite -->
0
-<pre><tt>Creating project
em <span style="color: #990000">(</span><span style="color: #993399">185</span><span style="color: #990000">.</span>3ms<span style="color: #990000">)</span></tt></pre></div></div>
0
+<pre><tt>Creating project
<span style="color: #990000">(</span><span style="color: #993399">185</span><span style="color: #990000">.</span>3ms<span style="color: #990000">)</span></tt></pre></div></div>
0
<div class="paragraph"><p>Please refer to <a href="http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M001336">API docs</a> for optional options to <tt>benchmark()</tt></p></div>
0
<h3 id="_controller">2.2. Controller</h3>
0
<div class="paragraph"><p>Similarly, you could use this helper method inside <a href="http://api.rubyonrails.com/classes/ActionController/Benchmarking/ClassMethods.html#M000715">controllers</a></p></div>
0
@@ -684,7 +684,7 @@ http://www.gnu.org/software/src-highlite -->
0
<h2 id="_request_logging">3. Request Logging</h2>
0
<div class="sectionbody">
0
-<div class="paragraph"><p>Rails log files contain
t very useful information about the time taken to serve each request. Here’s a typical log file entry:</p></div>
0
+<div class="paragraph"><p>Rails log files contain
very useful information about the time taken to serve each request. Here’s a typical log file entry:</p></div>
0
<div class="listingblock">
0
<div class="content"><!-- Generator: GNU source-highlight 2.9