Sha256: 34cf6e9f97ba2960e7d30b90adf3e00e224b8c6909974de5a59a52ff5cb5c29d

Contents?: true

Size: 300 Bytes

Versions: 8

Compression:

Stored size: 300 Bytes

Contents

events = %w(cache_read cache_generate cache_fetch_hit cache_write cache_delete)

regex = %r{#{events.join("|")}.active_support}

ActiveSupport::Notifications.subscribe regex do |*args|
  event = ActiveSupport::Notifications::Event.new(*args)
  gauge = Harness::Gauge.from_event event
  gauge.log
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
harness-0.2.4 lib/harness/integration/active_support.rb
harness-0.2.3 lib/harness/integration/active_support.rb
harness-0.2.2 lib/harness/integration/active_support.rb
harness-0.2.1 lib/harness/integration/active_support.rb
harness-0.2.0 lib/harness/integration/active_support.rb
harness-0.1.2 lib/harness/integration/active_support.rb
harness-0.1.1 lib/harness/integration/active_support.rb
harness-0.1.0 lib/harness/integration/active_support.rb