Sha256: d1d7c7d49dee04ea28af839418807d59ce9b17e7c2dbed84f8bc04d80a03b259
Contents?: true
Size: 716 Bytes
Versions: 8
Compression:
Stored size: 716 Bytes
Contents
module TraceView module MethodProfiling def profile_wrapper(method, report_kvs, opts, *args, &block) report_kvs[:Backtrace] = TraceView::API.backtrace(2) if opts[:backtrace] report_kvs[:Arguments] = args if opts[:arguments] TraceView::API.log(nil, :profile_entry, report_kvs) begin rv = self.send(method, *args, &block) report_kvs[:ReturnValue] = rv if opts[:result] rv rescue => e TraceView::API.log_exception(nil, e) raise ensure report_kvs.delete(:Backtrace) report_kvs.delete(:Controller) report_kvs.delete(:Action) TraceView::API.log(nil, :profile_exit, report_kvs) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems