推荐哪种PyPy内存分析器?

7

我应该使用哪些工具来监控PyPy的内存消耗?最好是可移植的,适用于各种Python解释器(CPython和PyPy)以及版本(2.6到3.3)。

1个回答

1
我只知道一个分析器,由Python社区自己提供,名为内存分析器
您可以使用pip或easy_install下载它。
$ easy_install -U memory_profiler # pip install -U memory_profiler

psutil 是此分析器推荐使用的模块。

如果您想从源代码安装它,

$ python setup.py install

最新的源代码可以在https://github.com/fabianp/memory_profiler找到。
文档、示例和API帮助可以在https://pypi.python.org/pypi/memory_profiler找到。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接