aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-08-09 09:59:54 -0300
committerYehuda Katz <wycats@gmail.com>2009-08-11 15:03:53 -0700
commitbef7576c09bbd51aeeb8e83b4cf24a994a0256b0 (patch)
tree2f6df19ed86c9b21c93d0b4f4f083ae891034c60
parent02d9dd900048407ef555cf09b0038a57ae924b0a (diff)
downloadrails-bef7576c09bbd51aeeb8e83b4cf24a994a0256b0.tar.gz
rails-bef7576c09bbd51aeeb8e83b4cf24a994a0256b0.tar.bz2
rails-bef7576c09bbd51aeeb8e83b4cf24a994a0256b0.zip
Add a few more benches
-rw-r--r--actionpack/examples/minimal.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/examples/minimal.rb b/actionpack/examples/minimal.rb
index b3733b487b..c4e5ffd36e 100644
--- a/actionpack/examples/minimal.rb
+++ b/actionpack/examples/minimal.rb
@@ -73,10 +73,18 @@ class BasePostController < ActionController::Base
render :partial => "/many_partials"
end
+ def hundred_partials
+ render :partial => "/hundred_partials"
+ end
+
def partial_collection
render :partial => "/collection", :collection => [1,2,3,4,5,6,7,8,9,10]
end
+ def large_collection
+ render :partial => "/collection", :collection => (1...100).to_a
+ end
+
def show_template
render :template => "template"
end
@@ -99,6 +107,8 @@ unless ENV["PROFILE"]
Runner.run(BasePostController.action(:partial), N, 'partial', false)
Runner.run(BasePostController.action(:many_partials), N, 'many_partials', false)
Runner.run(BasePostController.action(:partial_collection), N, 'collection', false)
+ Runner.run(BasePostController.action(:hundred_partials), N, 'hundred_partials', false)
+ Runner.run(BasePostController.action(:large_collection), N, 'large_collection', false)
Runner.run(BasePostController.action(:show_template), N, 'template', false)
(ENV["M"] || 1).to_i.times do
@@ -107,6 +117,8 @@ unless ENV["PROFILE"]
Runner.run(BasePostController.action(:partial), N, 'partial')
Runner.run(BasePostController.action(:many_partials), N, 'many_partials')
Runner.run(BasePostController.action(:partial_collection), N, 'collection')
+ Runner.run(BasePostController.action(:hundred_partials), N, 'hundred_partials')
+ Runner.run(BasePostController.action(:large_collection), N, 'large_collection')
Runner.run(BasePostController.action(:show_template), N, 'template')
end
else