From 0631bf4baf463a0e8ca74c56a21ed0b320d254d0 Mon Sep 17 00:00:00 2001 From: James Miller Date: Thu, 26 Aug 2010 12:27:44 -0700 Subject: Simplify render :partial --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 65f8d07e7a..7b21485ea0 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -469,7 +469,7 @@ And in "views":http://api.rubyonrails.org/classes/ActionController/Benchmarking/ <% benchmark("Showing projects partial") do %> - <%= render :partial => @projects %> + <%= render @projects %> <% end %> -- cgit v1.2.3 From 28474a7571b6a72f4a9433edf7c5212cf90c3938 Mon Sep 17 00:00:00 2001 From: Damien Mathieu Date: Tue, 31 Aug 2010 13:39:08 +0200 Subject: Fix benchmarking for rails3 * Fix the generated file examples * Fix the generators commands --- railties/guides/source/performance_testing.textile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 7b21485ea0..9dda6d420a 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -20,7 +20,7 @@ In a freshly generated Rails application, +test/performance/browsing_test.rb+ co require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionController::PerformanceTest @@ -34,17 +34,17 @@ This example is a simple performance test case for profiling a GET request to th h4. Generating Performance Tests -Rails provides a generator called +performance_test+ for creating new performance tests: +Rails provides a generator called +test_unit:performance+ for creating new performance tests: -rails generate performance_test homepage +rails generate test_unit:performance homepage This generates +homepage_test.rb+ in the +test/performance+ directory: require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class HomepageTest < ActionController::PerformanceTest # Replace this with your real tests. @@ -103,7 +103,7 @@ Here's the performance test for +HomeController#dashboard+ and +PostsController# require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class PostPerformanceTest < ActionController::PerformanceTest def setup @@ -131,7 +131,7 @@ Performance test for +Post+ model: require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class PostModelTest < ActionController::PerformanceTest def test_creation -- cgit v1.2.3 From 902ae14e650d87bc0ba3d34030c9bb38646c0d9f Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 19 Nov 2010 21:42:18 +0100 Subject: guides: gives clear instructions for feedback, removes links to the now archived LH project --- railties/guides/source/performance_testing.textile | 2 -- 1 file changed, 2 deletions(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 9dda6d420a..41bdd27e9b 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -524,7 +524,5 @@ Rails has been lucky to have two startups dedicated to Rails specific performanc h3. Changelog -"Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/4 - * January 9, 2009: Complete rewrite by "Pratik":credits.html#lifo * September 6, 2008: Initial version by Matthew Bergman -- cgit v1.2.3 From 80382c7465af27194dc9644b8ba4c4ad458b7ef7 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Thu, 16 Dec 2010 00:16:28 +0530 Subject: fixed link to ruby-prof --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 41bdd27e9b..b9401f3559 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -398,7 +398,7 @@ $ rails benchmarker 'Item.first' 'Item.last' h4. +profiler+ -+profiler+ is a wrapper around http://ruby-prof.rubyforge.org/[ruby-prof] gem. ++profiler+ is a wrapper around the "ruby-prof":http://ruby-prof.rubyforge.org gem. Usage: -- cgit v1.2.3 From c6b9e47d5c59554d13d7dabedb651c7bf69da56b Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 25 Dec 2010 23:27:15 +0530 Subject: use new routes --- railties/guides/source/performance_testing.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index b9401f3559..8cdfaf3e41 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -60,8 +60,8 @@ Let's assume your application has the following controller and model: # routes.rb -map.root :controller => 'home' -map.resources :posts +root :to => 'home#index' +resources :posts # home_controller.rb class HomeController < ApplicationController -- cgit v1.2.3 From 2801efbc3b3a5c5cf3406aa7063852a86898f547 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 25 Dec 2010 23:59:57 +0530 Subject: use all and first instead of find(:all) and find(:first) --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 8cdfaf3e41..341525a75c 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -436,7 +436,7 @@ h4. Model Project.benchmark("Creating project") do project = Project.create("name" => "stuff") project.create_manager("name" => "David") - project.milestones << Milestone.find(:all) + project.milestones << Milestone.all end -- cgit v1.2.3 From 7d12f53e856a7d940c9c29df21c7953d5b1699a1 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sun, 20 Feb 2011 21:37:39 +0530 Subject: cleans up PS1. Sorry lifo :) --- railties/guides/source/performance_testing.textile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 341525a75c..cd0a8fa384 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -316,16 +316,16 @@ Compile Ruby and apply this "GC Patch":http://rubyforge.org/tracker/download.php h5. Download and Extract -[lifo@null ~]$ mkdir rubygc -[lifo@null ~]$ wget -[lifo@null ~]$ tar -xzvf -[lifo@null ~]$ cd +$ mkdir rubygc +$ wget +$ tar -xzvf +$ cd h5. Apply the Patch -[lifo@null ruby-version]$ curl http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch | patch -p0 +$ curl http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch | patch -p0 h5. Configure and Install @@ -333,8 +333,8 @@ h5. Configure and Install The following will install ruby in your home directory's +/rubygc+ directory. Make sure to replace +<homedir>+ with a full patch to your actual home directory. -[lifo@null ruby-version]$ ./configure --prefix=//rubygc -[lifo@null ruby-version]$ make && make install +$ ./configure --prefix=//rubygc +$ make && make install h5. Prepare Aliases @@ -364,8 +364,8 @@ Additionally, install the following gems: If installing +mysql+ fails, you can try to install it manually: -[lifo@null mysql]$ gcruby extconf.rb --with-mysql-config -[lifo@null mysql]$ make && make install +$ gcruby extconf.rb --with-mysql-config +$ make && make install And you're ready to go. Don't forget to use +gcruby+ and +gcrake+ aliases when running the performance tests. -- cgit v1.2.3 From 287bb6990cf0c8a6e4b5ff4c0d75ecfa9bab33fa Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Fri, 25 Feb 2011 02:59:37 +0530 Subject: standardize all shell commands with the $ prefix --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index cd0a8fa384..32eebe863c 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -37,7 +37,7 @@ h4. Generating Performance Tests Rails provides a generator called +test_unit:performance+ for creating new performance tests: -rails generate test_unit:performance homepage +$ rails generate test_unit:performance homepage This generates +homepage_test.rb+ in the +test/performance+ directory: -- cgit v1.2.3 From 071ddb82812d1336450c9cbc6b317d5edfff3731 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 7 Mar 2011 06:18:32 +0900 Subject: more "SSL everywhere" for GitHub URLs see: https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere --- railties/guides/source/performance_testing.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides/source/performance_testing.textile') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 32eebe863c..5679bae531 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -500,8 +500,8 @@ h4. Rails Plugins and Gems * "Rails Analyzer":http://rails-analyzer.rubyforge.org * "Palmist":http://www.flyingmachinestudios.com/projects/ -* "Rails Footnotes":http://github.com/josevalim/rails-footnotes/tree/master -* "Query Reviewer":http://github.com/dsboulder/query_reviewer/tree/master +* "Rails Footnotes":https://github.com/josevalim/rails-footnotes/tree/master +* "Query Reviewer":https://github.com/dsboulder/query_reviewer/tree/master h4. Generic Tools -- cgit v1.2.3