diff --git a/Gemfile b/Gemfile index f8fb7aa..7e62a9e 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/script/heap_dump.rb b/script/heap_dump.rb new file mode 100644 index 0000000..8d8a16b --- /dev/null +++ b/script/heap_dump.rb @@ -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