mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:01 -05:00
Use the new query API in AR performance script.
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user