module MyBenchmark
Public Class Methods
measure(caption, &block)
click to toggle source
# File lib/custom_fields.rb, line 76 def self.measure(caption, &block) t1 = Time.now returned_value = block.call puts "[MyBenchmark] #{caption} took #{((Time.now - t1) * 1000).to_i} ms" returned_value end