Mercurial > public > mercurial-scm > hg
comparison contrib/memory.py @ 28510:ade330deb39a
contrib: make memory.py use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 13 Mar 2016 01:32:42 +0530 |
parents | 3e0d27d298b7 |
children | ff896733c66a |
comparison
equal
deleted
inserted
replaced
28509:9e3ecb6f4995 | 28510:ade330deb39a |
---|---|
9 | 9 |
10 Reads current and peak memory usage from ``/proc/self/status`` and | 10 Reads current and peak memory usage from ``/proc/self/status`` and |
11 prints it to ``stderr`` on exit. | 11 prints it to ``stderr`` on exit. |
12 ''' | 12 ''' |
13 | 13 |
14 from __future__ import absolute_import | |
14 import atexit | 15 import atexit |
15 | 16 |
16 def memusage(ui): | 17 def memusage(ui): |
17 """Report memory usage of the current process.""" | 18 """Report memory usage of the current process.""" |
18 result = {'peak': 0, 'rss': 0} | 19 result = {'peak': 0, 'rss': 0} |