Created
April 6, 2016 01:20
-
-
Save hagiyat/28ee7dd54f45b34d53f4e8a808a0910a to your computer and use it in GitHub Desktop.
Benchmark method of performance measurement methods
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
module SimpleBenchmark | |
require 'benchmark' | |
def benchmarker(report_name) | |
Benchmark.bm 10 do |r| | |
r.report(report_name) do | |
yield | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment