contrib/memory.py
changeset 10264 d6512b3e9ac0
parent 10017 253d0da256b2
child 10282 08a0f04b56bd
equal deleted inserted replaced
10260:fe699ca08a45 10264:d6512b3e9ac0
     1 # memory.py - track memory usage
     1 # memory.py - track memory usage
     2 #
     2 #
     3 # Copyright 2009 Matt Mackall <mpm@selenic.com> and others
     3 # Copyright 2009 Matt Mackall <mpm@selenic.com> and others
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2, incorporated herein by reference.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 '''helper extension to measure memory usage
     8 '''helper extension to measure memory usage
     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.