Skip to content

Instantly share code, notes, and snippets.

@deepzm
Created February 19, 2015 09:59
Show Gist options
  • Save deepzm/f05bca5e8e8c526174e6 to your computer and use it in GitHub Desktop.
Save deepzm/f05bca5e8e8c526174e6 to your computer and use it in GitHub Desktop.
ruby heap dump
require 'objspace'
dumps = []
ObjectSpace.each_object do |class_name|
dumps << ObjectSpace.dump(class_name, output: :string)
end
p dumps.length
p dumps[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment