lib/phobos/instrumentation.rb in phobos-1.6.1 vs lib/phobos/instrumentation.rb in phobos-1.7.0

- old
+ new

@@ -1,5 +1,7 @@ +require 'active_support/notifications' + module Phobos module Instrumentation NAMESPACE = 'phobos' def self.subscribe(event) @@ -14,14 +16,8 @@ def instrument(event, extra = {}) ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do |extra| yield(extra) if block_given? end - end - - def measure - start = Time.now.utc - yield if block_given? - (Time.now.utc - start).round(3) end end end