Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created June 18, 2020 10:54
Show Gist options
  • Save meysampg/633afc473ca3f749001883185622c598 to your computer and use it in GitHub Desktop.
Save meysampg/633afc473ca3f749001883185622c598 to your computer and use it in GitHub Desktop.
Showing memory usage info as debug on logging
import logging
from pympler import muppy, summary
def mem_leak():
all_objects = muppy.get_objects()
sum1 = summary.summarize(all_objects)
logging.debug("\n" + "\n".join(list(summary.format_(sum1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment