Sha256: bbcfb2f718ce6d541bce3f39353aa69f1c4abd9f0551eab88495a7c9c6cd5aa2

Contents?: true

Size: 667 Bytes

Versions: 52

Compression:

Stored size: 667 Bytes

Contents

class JRubyProf
  class SimpleTreePrinter < AbstractPrinter
    def print_on(output)
      thread_set.invocations.each_with_index do |invocation, i|
        output.puts 
        output.puts "*** Thread #{i + 1} / #{thread_set.length}"
        output.puts 
        dump_from_root(output, invocation)
      end
    end
    
    private
    
    def dump(f, inv, indent=0)
      f.print(" "*indent)
      f.puts "#{inv.name} - #{inv.duration}"
      inv.children.each {|child_inv| dump(f, child_inv, indent + 2)}
    end
    
    def dump_from_root(f, inv)
      current = inv
      current = current.parent while current.parent
      dump(f, current)
    end
  end
end

Version data entries

52 entries across 52 versions & 4 rubygems

Version Path
redcar-dev-0.12.16dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.15dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.14dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.13dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.12dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.11dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.10dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.9dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.8dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.7dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.6dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.4dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.3dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.1dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-dev-0.12.0dev-java plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.11 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.11.0dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.10 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.9.2 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
rdp-jruby-prof-0.1.0.1 lib/jruby-prof/simple_tree_printer.rb