aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-profile.rb12
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)