Class: DeepCover::Tools::Profiling::RubyProfProfiler
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- DeepCover::Tools::Profiling::RubyProfProfiler
- Defined in:
- lib/deep_cover/tools/profiling.rb
Instance Method Summary collapse
-
#initialize ⇒ RubyProfProfiler
constructor
A new instance of RubyProfProfiler.
- #report(results) ⇒ Object
Constructor Details
#initialize ⇒ RubyProfProfiler
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 |