Created
March 3, 2017 15:12
-
-
Save carlpett/7bd0bf087658056a7e863b1d1fdd19a9 to your computer and use it in GitHub Desktop.
saltstack/salt #39717
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
from salt import client | |
from time import sleep | |
import objgraph | |
import gc | |
objgraph.show_growth(limit=3) | |
def loopetiloop(): | |
i = 0 | |
while True: | |
caller = client.Caller() | |
i += 1 | |
print "\n--------{0}--------\n".format(i) | |
caller.cmd('state.highstate', test=True) | |
objgraph.show_growth(limit=40) | |
del caller | |
loopetiloop() | |
print "---- done ----" | |
objgraph.show_growth(limit=40) | |
gc.collect() | |
objgraph.show_growth(limit=40) | |
roots = objgraph.get_leaking_objects() | |
print objgraph.show_most_common_types(objects=roots) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment