mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

This command loads all formulae and dumps an HTML profile report to stdout. So e.g. `brew profile >/tmp/report.html`
13 lines
261 B
Ruby
Executable File
13 lines
261 B
Ruby
Executable File
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)
|