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:
parent
18b08964f4
commit
7a0069f1d6
2
Gemfile
2
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
|
||||
|
||||
6
script/heap_dump.rb
Normal file
6
script/heap_dump.rb
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user