devel/profile.rb (305B) - raw
1 require 'ruby-prof'
2 require "redwood"
3
4 result = RubyProf.profile do
5 Redwood::ThreadSet.new(ARGV.map { |fn| Redwood::MBox::Scanner.new fn }).load_n_threads 100
6 end
7
8 printer = RubyProf::GraphHtmlPrinter.new(result)
9 File.open("profile.html", "w") { |f| printer.print(f, 1) }
10 puts "report in profile.html"
11