From b87a232668d9f9f3b32c2fceb60bc5f6ef46df22 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Thu, 9 Feb 2017 00:07:44 +0100 Subject: Reorder the folders in tools to prepare moving tools/editor - `certs` and `editor_fonts` go to `thirdparty` - `dist` and `scripts` go to a new `misc` folder - `collada` and `doc` go to `tools/editor` The next step will be to rename `tools/editor` to `editor` directly, but this will be done at the right time to avoid breaking too many PRs. --- misc/scripts/memsort.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 misc/scripts/memsort.py (limited to 'misc/scripts/memsort.py') diff --git a/misc/scripts/memsort.py b/misc/scripts/memsort.py new file mode 100644 index 000000000..fb636b0f7 --- /dev/null +++ b/misc/scripts/memsort.py @@ -0,0 +1,35 @@ + +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])) -- cgit v1.2.3-70-g09d2