Translations:Python/76/en
Jump to navigation
Jump to search
- Install py-spy in a virtualenv in your home
- Attach to the running job, using
srun --pty --jobid JOBID bash
- Use
htop -u $USER
to find the process ID of your python script - Activate the virtualenv where py-spy is installed
- Run
py-spy top --pid PID
to see live feedback about where your code is spending time - Run
py-spy dump --pid PID
to get a traceback of where your code is currently at.