python 内存分析

pip install memory-profiler
from memory_profiler import profile

# @profile(precision=4, stream=open('memory_profiler.log','w+'))
@profile
def func():
    ... ...

if __name__=='__main__':
    func()
posted @ 2024-04-03 11:34  Raina_R  阅读(3)  评论(0编辑  收藏  举报