Sha256: f4ae625866df55b93bbf2e326e0643d839a1959247b384377de1bb463a0e78f1
Contents?: true
Size: 694 Bytes
Versions: 15
Compression:
Stored size: 694 Bytes
Contents
module NotificationHelpers def notification_event(args={}) args = { :name => 'process_action.action_controller', :start => fixed_time, :ending => fixed_time + 0.1, :tid => '1', :payload => create_payload }.merge(args) ActiveSupport::Notifications::Event.new( args[:name], args[:start], args[:ending], args[:tid], args[:payload] ) end def create_payload(args = {}) { :path => '/blog', :action => 'show', :controller => 'BlogPostsController', :request_format => 'html', :request_method => "GET", :status => '200', :view_runtime => 500, :db_runtime => 500 }.merge(args) end end
Version data entries
15 entries across 15 versions & 1 rubygems