Created
December 12, 2014 19:26
-
-
Save barkerja/faf0a172d8d53493297e to your computer and use it in GitHub Desktop.
sort object allocation by count
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
objects = Hash.new(0) | |
ObjectSpace.each_object { |obj| objects[obj.class] += 1 } | |
p objects.sort_by { |_,v| -v } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment