提交 4883082f 编写于 作者: J Jeremy Kemper

Support an extra profile printer arg

上级 7b730a2f
......@@ -63,7 +63,9 @@ after = GC.allocated_size
usage = (after - before) / 1024.0
if mode
if RubyProf.const_defined?(:CallStackPrinter)
if printer = ARGV.shift
RubyProf.const_get("#{printer.to_s.classify}Printer").new(results).print($stdout)
elsif RubyProf.const_defined?(:CallStackPrinter)
File.open("#{File.basename(path, '.rb')}.#{mode}.html", 'w') do |out|
RubyProf::CallStackPrinter.new(results).print(out)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册