Class: WprofSubscriptors

Inherits:
Object
  • Object
show all
Defined in:
lib/wprof/wprof_subscriptors.rb

Class Method Summary collapse

Class Method Details

.subscriptorsObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/wprof/wprof_subscriptors.rb', line 2

def self.subscriptors
  ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    GenProf.new(event, :standard)
  end

  ActiveSupport::Notifications.subscribe 'wprof.service' do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    GenProf.new(event, :service)
  end

  ActiveSupport::Notifications.subscribe 'wprof.custom' do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    GenProf.new(event, :custom)
  end
end