summaryrefslogtreecommitdiffstats
path: root/baseline/summarize-uwss.py
blob: f7df269e73cc5b1b1e576a5311bb8b4b97602f46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python3
import sys

f = sys.argv[1]
res = []
res.append({})
res.append({})
res.append({})
SAMPLES = 500

with open(f) as fp:
    for line in fp:
        s = line.split()
        mode = int(s[0])-1
        if s[1] not in res[mode]:
            res[mode][s[1]] = float(s[5])
        else:
            if "finished" not in s[5]:
                res[mode][s[1]] += float(s[5])
            else:
                res[mode][s[1]] += float(s[7])

print("Average times low:")
for r in res[0].keys():
    print(res[0][r]/SAMPLES)
print("Average times medium:")
for r in res[1].keys():
    print(res[1][r]/SAMPLES)
print("Average times high:")
for r in res[2].keys():
    print(res[2][r]/SAMPLES)