-
-
Save dhoss/3effe09fef0386cb3aa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Give it two procs to compare | |
def bm(o, n) | |
reload! | |
puts "Running 10 times" | |
Benchmark.bmbm(10) do |x| | |
x.report('Old Query:') { @olr = o.call } | |
x.report('New Query:') { @nr = n.call } | |
end | |
reload! | |
puts 'Old Result:' | |
table(@olr) | |
puts 'New Result' | |
table(@nr) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment