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
module ObjectDiagnostics | |
extend self | |
#This is handy when you want to determine what types of objects are contributing to memory bloat | |
#returns the change in object counts since the last time this method was called | |
def change_in_object_counts | |
#this will start all counts at 0 for the initial run | |
@previous_counts ||= Hash.new(0) |