Adding diagnostics posted to gist to debug out of memory

asserts diagnostics.rb is copied