diff options
| author | Juan Linietsky | 2014-02-09 22:10:30 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-02-09 22:10:30 -0300 |
| commit | 0b806ee0fc9097fa7bda7ac0109191c9c5e0a1ac (patch) | |
| tree | 276c4d099e178eb67fbd14f61d77b05e3808e9e3 /tools/memsort.py | |
| parent | 0e49da1687bc8192ed210947da52c9e5c5f301bb (diff) | |
| download | godot-0b806ee.tar.gz godot-0b806ee.tar.zst godot-0b806ee.zip | |
GODOT IS OPEN SOURCE
Diffstat (limited to 'tools/memsort.py')
| -rw-r--r-- | tools/memsort.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/memsort.py b/tools/memsort.py new file mode 100644 index 000000000..8ecccae8b --- /dev/null +++ b/tools/memsort.py @@ -0,0 +1,36 @@ + +import sys + +arg="memdump.txt" + +if (len(sys.argv)>1): + arg=sys.argv[1] + +f = open(arg,"rb") + + +l=f.readline() + + +sum = {} +cnt={} + + +while(l!=""): + + s=l.split("-") + amount = int(s[1]) + what=s[2] + if (what in sum): + sum[what]+=amount + cnt[what]+=1 + else: + sum[what]=amount + cnt[what]=1 + + l=f.readline() + + +for x in sum: + print(x.strip()+"("+str(cnt[x])+"):\n: "+str(sum[x])) +
\ No newline at end of file |
