Created
January 19, 2011 18:02
-
-
Save adamsanderson/786562 to your computer and use it in GitHub Desktop.
Instrumentation for rails test cases in ruby 1.9
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
setup{ | |
GC.start | |
@__mem_stats = ObjectSpace.count_objects.dup | |
} | |
teardown{ | |
GC.start | |
ObjectSpace.count_objects.each{|k,v| puts("%12s: %d" % [k, v - @__mem_stats[k] || 0]) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment