lib/metrics.rb
# Report the running time of the provided block using {#time}.
Report the running time of the provided block using {#time}.
Report the running time of the provided block using { #time } .
def timed(stat, sample_rate=1)
    t = time(stat, sample_rate)
    begin
      yield
    ensure
      t.stop
    end
  end
def timed ( stat , sample_rate = 1 ) t = time ( stat , sample_rate ) begin yield ensure t . stop end end
Report the running time of the provided block using {#time}.
Report the running time of the provided block using { #time } .
stat
<not_specific>
sample_rate
<not_specific>