Skip to content

Instantly share code, notes, and snippets.

@antonagestam
Created June 18, 2021 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonagestam/9806d723ed694a3feef781d280ecf89b to your computer and use it in GitHub Desktop.
Save antonagestam/9806d723ed694a3feef781d280ecf89b to your computer and use it in GitHub Desktop.
import time
import signal
import resource
def debug(signum, frame):
print(f"RSS: {resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}")
print(f"{resource.getpagesize()=}")
signal.signal(signal.SIGINFO, debug)
while True:
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment