123456789_123456789_123456789_123456789_123456789_

Class: ActionView::StructuredEventSubscriber

Do not use. This class is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Classes:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveSupport::StructuredEventSubscriber
Defined in: actionview/lib/action_view/structured_event_subscriber.rb

Constant Summary

::ActiveSupport::StructuredEventSubscriber - Inherited

DEBUG_CHECK

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.newStructuredEventSubscriber

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 9

def initialize
  @root = nil
  super
end

Class Method Details

.attach_to

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 87

def self.attach_to(*)
  ActiveSupport::Notifications.subscribe("render_template.action_view", Start.new)
  ActiveSupport::Notifications.subscribe("render_layout.action_view", Start.new)

  super
end

Instance Method Details

#render_collection(event)

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 44

def render_collection(event)
  emit_debug_event("action_view.render_collection",
    identifier: from_rails_root(event.payload[:identifier] || "templates"),
    layout: from_rails_root(event.payload[:layout]),
    duration: event.duration.round(2),
    gc: event.gc_time.round(2),
    cache_hits: event.payload[:cache_hits],
    count: event.payload[:count],
  )
end

#render_layout(event)

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 35

def render_layout(event)
  emit_event("action_view.render_layout",
    identifier: from_rails_root(event.payload[:identifier]),
    duration: event.duration.round(2),
    gc: event.gc_time.round(2),
  )
end

#render_partial(event)

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 24

def render_partial(event)
  emit_debug_event("action_view.render_partial",
    identifier: from_rails_root(event.payload[:identifier]),
    layout: from_rails_root(event.payload[:layout]),
    duration: event.duration.round(2),
    gc: event.gc_time.round(2),
    cache_hit: event.payload[:cache_hit],
  )
end

#render_template(event)

[ GitHub ]

  
# File 'actionview/lib/action_view/structured_event_subscriber.rb', line 14

def render_template(event)
  emit_debug_event("action_view.render_template",
    identifier: from_rails_root(event.payload[:identifier]),
    layout: from_rails_root(event.payload[:layout]),
    duration: event.duration.round(2),
    gc: event.gc_time.round(2),
  )
end