summaryrefslogtreecommitdiffstats
path: root/baseline/summarize-wss.py
blob: e759f61ed0781a75d4a90aa1868a8d34eeda807e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3
import sys

f = sys.argv[1]
res = {}
SAMPLES = 0

with open(f) as fp:
    for line in fp:
        s = line.split()
        if s[0] not in res:
            res[s[0]] = float(s[4])
            SAMPLES = 1
        else:
            res[s[0]] += float(s[4])
            SAMPLES += 1

print("Average times:")
for r in res.keys():
    print(res[r]/SAMPLES)