-
-
Save tenderlove/87ccc44bacca6c4c6f9d to your computer and use it in GitHub Desktop.
This file contains 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
require "objspace" | |
require "miq-process" | |
start_time = Time.now | |
done = false | |
first = true | |
def iter n | |
if n > 0 | |
1.times{ | |
iter(n-1) | |
} | |
else | |
# null code | |
end | |
end | |
def gc | |
iter(100) | |
GC.start | |
GC.start | |
end | |
ManageIQ::Providers::Vmware::InfraManager.module_eval do | |
def use_vim_broker?; false; end | |
end | |
require 'miq_fault_tolerant_vim' | |
def do_the_thing | |
ObjectSpace.trace_object_allocations_start | |
e = ExtManagementSystem.first | |
e.verify_credentials | |
EmsRefresh.refresh(e) | |
e.clear_association_cache | |
e = nil | |
gc | |
end | |
EmsRefresh.init_console | |
do_the_thing | |
require 'miq_fault_tolerant_vim' | |
gc | |
done = true | |
gc | |
#binding.pry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment