module Omnibus::Instrumentation
Public Instance Methods
measure(label) { || ... }
click to toggle source
# File lib/omnibus/instrumentation.rb, line 21 def measure(label, &block) start = Time.now yield ensure elapsed = Time.now - start log.info(log_key) { "#{label}: #{elapsed.to_f.round(4)}s" } end