python 检查内存

################################
# 测试函数运行内存
# coding=utf-8
# pip install memory_profiler
# pip install psutil
# 在pycharm包管理器里装
from memory_profiler import profileapp


@profile
def test():
list_m = []函数

for i in range(1000000):
list_m.append(i)测试

print len(list_m)ip


test()
################################内存

相关文章
相关标签/搜索