Created
March 10, 2015 06:08
-
-
Save gregburek/cb9d808f5a4b339cd6fd to your computer and use it in GitHub Desktop.
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
> ObjectSpace.dump_all(output: File.open("heap.json", "w")) | |
> `file heap.json` | |
=> "heap.json: ASCII text, with very long lines\n" | |
> `ls -al heap.json` | |
=> "-rw------- 1 u47788 47788 985808896 Mar 10 05:29 heap.json\n" | |
> `du -sh heap.json` | |
=> "941M\theap.json\n" | |
> `cat heap.json | ruby -rjson -ne ' obj = JSON.parse($_).values_at("file","line","type"); puts obj.join(":") if obj.first '> /dev/null` | |
/app/vendor/bundle/ruby/2.2.0/gems/json-1.8.2/lib/json/common.rb:155:in `parse': 757: unexpected token at '{"address":"0x7f9dd68e3f20", "type":"STRING", "class":"0x7f9dc82b0ee0", "embedded":true, "bytesiz' (JSON::ParserError) | |
from /app/vendor/bundle/ruby/2.2.0/gems/json-1.8.2/lib/json/common.rb:155:in `parse' | |
from -e:1:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment