python system performance

Solutions on MaxInterview for python system performance by the best coders in the world

showing results for - "python system performance"
Butch
19 Oct 2019
1import os
2import psutil
3pid = os.getpid()
4py = psutil.Process(pid)
5memoryUse = py.memory_info()[0]/2.**30  # memory use in GB...I think
6print('memory use:', memoryUse)
7