lcm@lcm-Desktop:~$ python3 --version
Python 3.8.5
lcm@lcm-Desktop-:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
lcm@lcm-Desktop-:~$ python3 -m memory_profiler testMemNumPy.py
debtest
fintest
Filename: testMemNumPy.py
Line # Mem usage Increment Occurences Line Contents
============================================================
1 18.281 MiB 18.281 MiB 1 @profile
2 def my_test():
3 32.625 MiB 14.344 MiB 1 import numpy
4 795.910 MiB 763.285 MiB 1 a = numpy.arange(100000000.0)
Filename: testMemNumPy.py
Line # Mem usage Increment Occurences Line Contents
============================================================
6 33.223 MiB 33.223 MiB 1 @profile
7 def my_mem():
8 33.223 MiB 0.000 MiB 1 print('fintest')
lcm@lcm-Desktop:~$
Partager