diff options
author | drebs <drebs@leap.se> | 2014-03-11 16:14:26 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-03-11 16:14:26 -0300 |
commit | 94ec89384abeba52d660addf3528b11a9aa5a8b0 (patch) | |
tree | 8781a9b89034083f7d8dae1d06b08d1debf6db1a /scripts/doc_put_memory_usage/get-mem.py | |
parent | a8d002714e4ce2ff487785357cc01d082ffad537 (diff) |
Add script to measure PUT memory usage.
Diffstat (limited to 'scripts/doc_put_memory_usage/get-mem.py')
-rwxr-xr-x | scripts/doc_put_memory_usage/get-mem.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/doc_put_memory_usage/get-mem.py b/scripts/doc_put_memory_usage/get-mem.py new file mode 100755 index 00000000..d64875fc --- /dev/null +++ b/scripts/doc_put_memory_usage/get-mem.py @@ -0,0 +1,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 |