📜  python系统性能——Python代码示例

📅  最后修改于: 2022-03-11 14:47:18.701000             🧑  作者: Mango

代码示例1
import os
import psutil
pid = os.getpid()
py = psutil.Process(pid)
memoryUse = py.memory_info()[0]/2.**30  # memory use in GB...I think
print('memory use:', memoryUse)