Skip to content

Commit

Permalink
DEV: undo pluck_first changes to micro benchmark
Browse files Browse the repository at this point in the history
and add pluck_first benchmark
  • Loading branch information
danielwaterworth committed Oct 21, 2019
1 parent 55a1394 commit 1352a5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/micro_bench.rb
Expand Up @@ -15,10 +15,14 @@
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

Expand Down

0 comments on commit 1352a5b

Please sign in to comment.