Sha256: d55bcc7cf3dcddf5b2a566d13c5a4a5972626fdda2b79b2dd498c2c39d7f0fec
Contents?: true
Size: 604 Bytes
Versions: 31
Compression:
Stored size: 604 Bytes
Contents
module Errplane module Rails module Instrumentation def benchmark_for_instrumentation start = Time.now yield elapsed = ((Time.now - start) * 1000).ceil Errplane.report("instrumentation/#{controller_name}##{action_name}", :value => elapsed) end def self.included(base) base.extend(ClassMethods) end module ClassMethods def instrument(methods = []) methods = [methods] unless methods.is_a?(Array) around_filter :benchmark_for_instrumentation, :only => methods end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems