1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Add heap_dump script

This commit is contained in:
Daniel Barber 2015-10-14 16:33:36 +01:00
parent 18b08964f4
commit 7a0069f1d6
2 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,8 @@ group :development do
gem 'binding_of_caller'
gem 'letter_opener'
gem 'tunnel'
gem 'rbtrace', git: 'https://github.com/tmm1/rbtrace', branch: 'master'
gem 'foreman'
end
group :test, :development do

6
script/heap_dump.rb Normal file
View File

@ -0,0 +1,6 @@
Thread.new do
require "objspace"
ObjectSpace.trace_object_allocations_start
GC.start()
ObjectSpace.dump_all(output: File.open("heap.json", "w"))
end.join