Created
June 26, 2012 17:33
-
-
Save tiegz/2997289 to your computer and use it in GitHub Desktop.
set_trace_func experiment
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
x = Hash.new(0) | |
orig = ObjectSpace.count_objects | |
set_trace_func proc { |event, file, line, id, binding, classname| | |
ObjectSpace.each_pair { |k,v| | |
x["#{file}:#{line}:#{k}"] += [0,(v - orig[k])].max | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment