Module: Boggler::Benchmarking
Instance Method Summary collapse
Instance Method Details
#measure(description, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/boggler/benchmarking.rb', line 7 def measure(description, &block) benchmark_format = "%n\t#{Benchmark::FORMAT}" puts Benchmark.measure(description) { yield if block_given? }.format(benchmark_format) end |