diff options
| author | Jack Nagel | 2013-06-15 16:39:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-15 16:41:14 -0500 |
| commit | f53eb7b52c153252461d6d4cfd24d7962528d1b4 (patch) | |
| tree | 637e48da95799c413a629f58bc917fedce0fa465 /Library | |
| parent | 9734c1ee19b0413487880180aed949fa4b745e53 (diff) | |
| download | homebrew-f53eb7b52c153252461d6d4cfd24d7962528d1b4.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) |
