class RubyProf::MultiPrinter

Helper class to simplify printing profiles of several types from one profiling run. Currently prints a flat profile, a callgrind profile, a call stack profile and a graph profile.

Public Class Methods

new(result) click to toggle source
# File lib/ruby-prof/printers/multi_printer.rb, line 7
def initialize(result)
  @stack_printer = CallStackPrinter.new(result)
  @graph_printer = GraphHtmlPrinter.new(result)
  @tree_printer = CallTreePrinter.new(result)
  @flat_printer = FlatPrinter.new(result)
end

Public Instance Methods

flat_profile() click to toggle source

the name of the flat profile file

# File lib/ruby-prof/printers/multi_printer.rb, line 50
def flat_profile
  "#{@directory}/#{@profile}.flat.txt"
end
graph_profile() click to toggle source

the name of the graph profile file

# File lib/ruby-prof/printers/multi_printer.rb, line 40
def graph_profile
  "#{@directory}/#{@profile}.graph.html"
end
print(options) click to toggle source

create profile files under options or the current directory. options is used as the base name for the pofile file, defaults to “profile”.

stack_profile() click to toggle source

the name of the call stack profile file

# File lib/ruby-prof/printers/multi_printer.rb, line 35
def stack_profile
  "#{@directory}/#{@profile}.stack.html"
end
tree_profile() click to toggle source

the name of the callgrind profile file

# File lib/ruby-prof/printers/multi_printer.rb, line 45
def tree_profile
  "#{@directory}/#{@profile}.grind.dat"
end