summaryrefslogtreecommitdiff
path: root/scripts/profiling/doc_put_memory_usage/get-mem.py
blob: d64875fc64ce641e5263777cb1b7b1b49e1aa5ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python


import psutil
import time


delta = 50 * 60
start = time.time()

while True:
    now = time.time()
    print "%s %s" % (now - start, psutil.phymem_usage().used)
    time.sleep(0.1)
    if now > start + delta:
        break