DEV: undo pluck_first changes to micro benchmark

and add pluck_first benchmark
This commit is contained in:
Daniel Waterworth 2019-10-21 12:21:10 +01:00
parent 55a1394342
commit 1352a5b5fa
1 changed files with 5 additions and 1 deletions

View File

@ -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