Is there something like this (show memory use and call times for a Python process) that just runs on my computer to help me profile a long-running Python process?
Is there something like this (show memory use and call times for a Python process) that just runs on my computer to help me profile a long-running Python process?
pyrasite (http://pyrasite.com/) will let you inject code into a process. This can be used to add monitoring of private internal state etc (if you have no other options).
If you want to have locally hosted graphs then grafana and influx are my current tools of choice.
It is going to be more work than swiping a credit card, but not a crazy amount.
cinnamon-screensaver would take multiple seconds to lock the screen even after I'd stopped profiling and exited the interpreter I'd injected, and I wound up restarting it so I could lock my screen quickly again.
I don't know why this happened, but it's enough to make me think twice, and I'm definitely going to double-check my process is still performing as I hope after injecting it with pyrasite in the future.
Sysdig is available though. It even got userspace tracers recently (including Python). Alternatively there's "perf" if you want just the kernel side.
For Python3: https://github.com/rixx/lptrace/tree/python3