Created
March 10, 2014 17:35
-
-
Save pgeraghty/9469912 to your computer and use it in GitHub Desktop.
Benchmark require load time and memory usage
This file contains hidden or 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
require 'benchmark' | |
def require(file) | |
puts `pmap #{Process.pid} | grep 'total'` | |
puts Benchmark.measure('') { super }.format("%t require #{file}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment