lib/harness/instrumentation.rb in harness-0.9.1 vs lib/harness/instrumentation.rb in harness-1.0.0

- old
+ new

@@ -1,8 +1,23 @@ -ActiveSupport::Notifications.subscribe %r{.+} do |*args| - event = ActiveSupport::Notifications::Event.new(*args) - - unless event.payload[:exception] - Harness::Gauge.from_event(event).log if event.payload[:gauge] - Harness::Counter.from_event(event).log if event.payload[:counter] +module Harness + module Instrumentation + def timing(*args) + Harness.timing *args + end + + def time(*args, &block) + Harness.time *args, &block + end + + def gauge(*args) + Harness.gauge *args + end + + def increment(*args) + Harness.increment *args + end + + def decrement(*args) + Harness.decrement *args + end end end