mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
DEV: undo pluck_first changes to micro benchmark
and add pluck_first benchmark
This commit is contained in:
@ -15,10 +15,14 @@ Benchmark.ips do |b|
|
||||
end
|
||||
|
||||
b.report("pluck with first") do
|
||||
User.pluck_first(:name)
|
||||
User.pluck(:name).first
|
||||
end
|
||||
|
||||
b.report("pluck with limit") do
|
||||
User.limit(1).pluck(:name).first
|
||||
end
|
||||
|
||||
b.report("pluck with pluck_first") do
|
||||
User.pluck_first(:name)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user