Sha256: 875c5548c36604345f5ac9e60bb338a71219f262902750fb856894ad5dafc357
Contents?: true
Size: 770 Bytes
Versions: 34
Compression:
Stored size: 770 Bytes
Contents
require 'active_support/core_ext/module/attr_internal' module Scrivito module ControllerRuntime extend ActiveSupport::Concern protected attr_internal :rc_runtime def cleanup_view_runtime rc_rt_before_render = Scrivito::LogSubscriber.reset_runtime runtime = super rc_rt_after_render = Scrivito::LogSubscriber.reset_runtime self.rc_runtime = rc_rt_before_render + rc_rt_after_render runtime - rc_rt_after_render end def append_info_to_payload(payload) super payload[:rc_runtime] = rc_runtime end module ClassMethods def log_process_action(payload) messages, rc_runtime = super, payload[:rc_runtime] messages << ("Scrivito: %.1fms" % rc_runtime.to_f) messages end end end end # module Scrivito
Version data entries
34 entries across 34 versions & 1 rubygems