import psutil, os ,sys process = psutil.Process(os.getpid()) mem = process.memory_info()[0] / float(2 ** 20) total_refcount = [ "{} = {}".format(value, sys.getrefcount(value)) for value in globals().values()] print "memory: {}M\nReference:\n {} ".format( mem, "\n".join(total_refcount), )
Subscribe
0 Comments