Class: DeepCover::Tools::Profiling::RubyProfProfiler

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/deep_cover/tools/profiling.rb

Instance Method Summary collapse

Constructor Details

#initializeRubyProfProfiler

Returns a new instance of RubyProfProfiler.



54
55
56
57
58
# File 'lib/deep_cover/tools/profiling.rb', line 54

def initialize
  raise 'Profiling is not available when using JRuby' if RUBY_PLATFORM == 'java'
  require 'ruby-prof'
  super(RubyProf)
end

Instance Method Details

#report(results) ⇒ Object



60
61
62
63
# File 'lib/deep_cover/tools/profiling.rb', line 60

def report(results)
  printer = RubyProf::GraphPrinter.new(results)
  printer.print(STDOUT, {})
end