Skip to content

A platform for community discussion. Free, open, simple.

DEV: undo pluck_first changes to micro benchmark

Daniel Waterworth1352a5b5fa71
diff --git a/script/micro_bench.rb b/script/micro_bench.rb
index 741d936428e..51ea6c89128 100644
--- a/script/micro_bench.rb
+++ b/script/micro_bench.rb
@@ -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