...
Code Block |
---|
from guppy import hpy import code hp=hpy() ... # reset the heap counters hp.setrelheap() ... # just print the heap somewhere: h = hp.heap() log.debug(f"\nheapy: {h}") # or possibly interrupt the code execution and inspect the hp object: code.interact(local=dict(globals(), **locals())) |
...