Sha256: ffca1a66e524df297113c6c9bb46b914d349baae37ee75e7398fbe44e8b55c43
Contents?: true
Size: 604 Bytes
Versions: 1
Compression:
Stored size: 604 Bytes
Contents
require 'ruby-prof' module Vedeu # Helps to debug a running application by providing a stack trace of its # execution upon exiting. # # @param filename [String] # @param block [Proc] def self.debug(filename = 'profile.html', &block) RubyProf.start yield result = RubyProf.stop result.eliminate_methods!([/^Array/, /^Hash/]) File.open('/tmp/' + filename, 'w') do |file| RubyProf::CallStackPrinter.new(result).print(file) # Used with QTCacheGrind to analyse performance. # RubyProf::CallTreePrinter.new(result).print(file) end end end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.4.2 | lib/vedeu/debug.rb |