Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = Registration.first.competition
- event = Event.find("333")
- v1 = (1..100).map do
- Benchmark.realtime do
- c.psych_sheet_event event
- end
- end
- v1 = v1.reduce(&:+) / v1.length
- v2 = (1..100).map do
- Benchmark.realtime do
- c.psych_sheet_event_v2 event
- end
- end
- v2 = v2.reduce(&:+) / v2.length
- v3 = (1..100).map do
- Benchmark.realtime do
- c.psych_sheet_event_v3 event
- end
- end
- v3 = v3.reduce(&:+) / v3.length
- puts "original: #{v1} (avg of 100)"
- puts "modified without send: #{v2} (avg of 100)"
- puts "modified with send: #{v3} (avg of 100)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement