mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
DEV: undo pluck_first changes to micro benchmark
and add pluck_first benchmark
This commit is contained in:
parent
55a1394342
commit
1352a5b5fa
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user