diff options
| author | Jack Nagel | 2013-06-15 16:39:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-15 16:41:14 -0500 |
| commit | cf66686a17617e6b9235f8aa655d6f8d3c846abf (patch) | |
| tree | 0e06285c8f062791b5f78231b9ae2c3bcfe91ecd /Library | |
| parent | e9d245cf3a6e1ce783931e8e339c11fb0f3757d5 (diff) | |
| download | brew-cf66686a17617e6b9235f8aa655d6f8d3c846abf.tar.bz2 | |
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`
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-profile.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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) |
