Sha256: 122247e9588f37eb6cd9abafca28b3cce8efd487fa47e6bc9743c218af835a18
Contents?: true
Size: 576 Bytes
Versions: 6
Compression:
Stored size: 576 Bytes
Contents
module NotificationsSupport def self.included(base) base.class_eval do after(:each) do ActiveSupport::Notifications.notifier.instance_variable_set(:@subscribers, []) ActiveSupport::Notifications.notifier.instance_variable_set(:@listeners_for, {}) end end end def event(options={}) SystemMetrics::NestedEvent.new( options[:name] || 'sql.active_record', options[:start] || (Time.now - 5.seconds), options[:end] || Time.now, options[:transaction_id] || 'tid', options[:payload] || {} ) end end
Version data entries
6 entries across 6 versions & 1 rubygems