Skip to content
Browse files

Use the new query API in AR performance script.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent b8330a2 commit df595b577edf807c3b9315feb882d12d9b249af9 @miloops miloops committed with josevalim
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/examples/performance.rb
View
6 activerecord/examples/performance.rb
@@ -116,15 +116,15 @@ def self.feel(exhibits) exhibits.each { |e| e.feel } end
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 = {

0 comments on commit df595b5

Please sign in to comment.
Something went wrong with that request. Please try again.