Add brew-profile to contrib

This command loads all formulae and dumps an HTML profile report to
stdout. So e.g. `brew profile >/tmp/report.html`
This commit is contained in:
Jack Nagel 2013-06-15 16:39:46 -05:00
parent e9d245cf3a
commit cf66686a17

View File

@ -0,0 +1,12 @@
begin
require 'rubygems'
require 'ruby-prof'
rescue LoadError
abort 'This command requires the ruby-prof gem'
end
require 'formula'
RubyProf.start
Formula.names.each { |n| Formula.factory(n) }
RubyProf::GraphHtmlPrinter.new(RubyProf.stop).print(STDOUT)