]> git.cworth.org Git - sup/blob - devel/profile.rb
Merge branch 'various-api-refactors' into next
[sup] / devel / profile.rb
1 require 'rubygems'
2 require 'ruby-prof'
3 require "redwood"
4
5 result = RubyProf.profile do
6   Redwood::ThreadSet.new(ARGV.map { |fn| Redwood::MBox::Scanner.new fn }).load_n_threads 100
7 end
8
9 printer = RubyProf::GraphHtmlPrinter.new(result)
10 File.open("profile.html", "w") { |f| printer.print(f, 1) }
11 puts "report in profile.html"
12