First install the memory_profiler and psutil (psutil is mainly used to improve the performance of memory_profile, recommended) (you can use PIP directly)
PIP install memory_profiler
p install psutil
Mprof run test. Py generates a
results. Dat file, such as “mprofile_20160716170529. Dat”, which records the memory along with the change of time
mprof plot
using the commands in the form of pictures showing
the original:
https://blog.csdn.net/baidu_33122327/article/details/79195176
Read More:
- Python program uses OS. System () method to call exe program, resulting in no response of main program process
- About the problem of calling tools library by running Python program under Mac OS X, modulenotfoundererror: no module named ‘tools‘
- Memory error in Python numpy matrix
- Python Anaconda Spyder can’t display pictures by using Matplotlib. Error report solution: figures now render in the plots pane by default. To mak
- Python: CUDA error: an illegal memory access was accounted for
- Visual studio console program output window flashed by
- Runtimeerror using Python training model: CUDA out of memory error resolution
- The difference, cause and solution of memory overflow and memory leak
- Hbase Native memory allocation (mmap) failed to map xxx bytes for committing reserved memory
- Kvm internal error: process exited :cannot set up guest memory ‘pc.ram‘:Cannot allocate memory
- How to solve the problem that the output results of C + + program written in VS2010 flash by
- os::commit_memory(0x0000000538000000, 11408506880, 0) failed; error=‘Cannot allocate memory‘
- Fatal error: Newspace:: rebalance allocation failed – process out of memory (memory overflow)
- How to run Python program directly with atom
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 …
- Several choices of using Python to write graphical interface program
- Raspberry pie set up to run Python program automatically
- The problem of failed to create process occurs in pyinstaller package program of Python
- Error in pyinstall package Python program: jinja2.exceptions.templatenotfound: Chart_ Solution to component.html