Class: JRubyProf::AbstractPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby-prof/abstract_printer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(thread_set, options = {}) ⇒ AbstractPrinter

Returns a new instance of AbstractPrinter.



6
7
8
9
# File 'lib/jruby-prof/abstract_printer.rb', line 6

def initialize(thread_set, options={})
  @thread_set = thread_set
  @options = options
end

Instance Attribute Details

#thread_setObject (readonly)

Returns the value of attribute thread_set.



4
5
6
# File 'lib/jruby-prof/abstract_printer.rb', line 4

def thread_set
  @thread_set
end

Instance Method Details



11
12
13
14
15
16
# File 'lib/jruby-prof/abstract_printer.rb', line 11

def print_to_file(filename)
  puts "Dumping trace to #{File.expand_path(filename)}"
  File.open(filename, "w") do |f|
    print_on(f)
  end
end