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.



56
57
58
59
60
# File 'lib/deep_cover/tools/profiling.rb', line 56

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



62
63
64
65
# File 'lib/deep_cover/tools/profiling.rb', line 62

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