Created
March 31, 2015 01:33
-
-
Save toolmantim/cc66133bc3682c89727a to your computer and use it in GitHub Desktop.
Using allocation tracer
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
# via https://github.com/halostatue/mime-types/pull/93#issuecomment-87814894 | |
require 'allocation_tracer' | |
require 'pretty_print' | |
$LOAD_PATH << "/Users/schneems/Documents/projects/mime-types/lib" | |
ObjectSpace::AllocationTracer.setup(%i{path line type}) | |
r = ObjectSpace::AllocationTracer.trace do | |
require 'mime/types' | |
end | |
pp r.sort {|x, y| x.last.first <=> y.last.first }.reverse.first(100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment