From cf66686a17617e6b9235f8aa655d6f8d3c846abf Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 15 Jun 2013 16:39:46 -0500 Subject: 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` --- Library/Contributions/cmd/brew-profile.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 Library/Contributions/cmd/brew-profile.rb (limited to 'Library') diff --git a/Library/Contributions/cmd/brew-profile.rb b/Library/Contributions/cmd/brew-profile.rb new file mode 100755 index 000000000..dfcc2c607 --- /dev/null +++ b/Library/Contributions/cmd/brew-profile.rb @@ -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) -- cgit v1.2.3