Created
September 3, 2012 02:53
-
-
Save mxcl/3606440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add before any other code in `bin/brew` | |
module Kernel | |
alias_method :old_backtick, :` | |
alias_method :old_system, :system | |
def system *args | |
t = Time.now | |
old_system *args | |
puts "#{Time.now - t}: #{args*' '}" | |
end | |
def ` arg | |
t = Time.now | |
s = old_backtick arg | |
puts "#{Time.now - t}: `#{arg}`" | |
s | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time brew audit android-ndk amap alure aldo | |
0.027497: `/usr/bin/sw_vers -productVersion` | |
0.011199: `/usr/bin/which brew-audit 2>/dev/null` | |
0.005405: `/usr/bin/which brew-audit.rb` | |
0.013156: `xcode-select -print-path 2>/dev/null` | |
0.28202: `/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version 2>/dev/null` | |
0.739916: `/usr/bin/xcodebuild -version -sdk macosx10.8 Path 2>/dev/null` | |
0.005013: `/usr/sbin/sysctl -n hw.ncpu` | |
0.011435: `xcode-select -print-path 2>/dev/null` | |
0.016608: `/usr/bin/xcrun -find llvm-gcc 2>/dev/null` | |
0.01528: `/usr/bin/xcrun -find make 2>/dev/null` | |
0.012752: `/usr/bin/xcrun -find make` | |
0.011144: `/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc --version` | |
real 0m1.146s | |
user 0m0.908s | |
sys 0m0.247s |
adamv
commented
Sep 3, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment