module Sunspot::Rails::Railties::ControllerRuntime

Protected Instance Methods

append_info_to_payload(payload) click to toggle source
Calls superclass method
# File lib/sunspot/rails/railties/controller_runtime.rb, line 21
def append_info_to_payload(payload)
  super
  payload[:solr_runtime] = solr_runtime
end
cleanup_view_runtime() click to toggle source
Calls superclass method
# File lib/sunspot/rails/railties/controller_runtime.rb, line 11
def cleanup_view_runtime
  # TODO only if solr is connected? if not call to super

  solr_rt_before_render = Sunspot::Rails::LogSubscriber.reset_runtime
  runtime = super
  solr_rt_after_render = Sunspot::Rails::LogSubscriber.reset_runtime
  self.solr_runtime = solr_rt_before_render + solr_rt_after_render
  runtime - solr_rt_after_render
end