require 'bundler/setup' require 'hedgelog' require 'ruby-prof' require 'logger' logger = Hedgelog.new('/dev/null') logger.level = Logger::INFO RubyProf.start 10_000.times do logger.info 'Foo' end result = RubyProf.stop result.eliminate_methods!([/Integer#times/]) # printer = RubyProf::GraphPrinter.new(result) printer = RubyProf::FlatPrinterWithLineNumbers.new(result) printer.print(STDOUT)