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-0.9.1 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.9.0 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.8.1 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.8 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
tw-studios-jruby-prof-0.1.1 lib/jruby-prof/simple_tree_printer.rb
redcar-0.7 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.6.1 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.6 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.6.1dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.1 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.6dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.5dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.4dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.3dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.2dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.5.1dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.4.1 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.4 plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb
redcar-0.3.10.1dev plugins/redcar_debug/vendor/jruby-prof/lib/jruby-prof/simple_tree_printer.rb