一、memory_profiler
This is a python module for monitoring memory consumption of a process as well as line-by-line analysis of memory consumption for python programs. It is a pure python module and has the psutil module as optional (but highly recommended) dependencies.
memory_profiler监控python进程,可以分析出每一行代码所增减的内存状况。
二、安装memory_profiler库
三、
链接: