aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-06-22 10:29:59 -0300
committerJosé Valim <jose.valim@gmail.com>2010-06-22 16:44:10 +0200
commitdf595b577edf807c3b9315feb882d12d9b249af9 (patch)
tree91025dd2ab1128a5d17cfdcaf6e8a06f593ed294 /activerecord
parentb8330a22619f647f16a671c1ad58730d8896f806 (diff)
downloadrails-df595b577edf807c3b9315feb882d12d9b249af9.tar.gz
rails-df595b577edf807c3b9315feb882d12d9b249af9.tar.bz2
rails-df595b577edf807c3b9315feb882d12d9b249af9.zip
Use the new query API in AR performance script.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/examples/performance.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/examples/performance.rb b/activerecord/examples/performance.rb
index f69576b240..f7d358337c 100644
--- a/activerecord/examples/performance.rb
+++ b/activerecord/examples/performance.rb
@@ -116,15 +116,15 @@ RBench.run(TIMES) do
end
report 'Model.all limit(100)', (TIMES / 10).ceil do
- ar { Exhibit.look Exhibit.all(:limit => 100) }
+ ar { Exhibit.look Exhibit.limit(100) }
end
report 'Model.all limit(100) with relationship', (TIMES / 10).ceil do
- ar { Exhibit.feel Exhibit.all(:limit => 100, :include => :user) }
+ ar { Exhibit.feel Exhibit.limit(100).includes(:user) }
end
report 'Model.all limit(10,000)', (TIMES / 1000).ceil do
- ar { Exhibit.look Exhibit.all(:limit => 10000) }
+ ar { Exhibit.look Exhibit.limit(10000) }
end
exhibit = {