summaryrefslogblamecommitdiffstats
path: root/baseline/summarize-uwss2.py
blob: bf3d3eab14c314e6ee28e4bb9dffdae44607c8c0 (plain) (tree)


































                                              
#!/usr/bin/python3
import sys

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

with open(f) as fp:
    for line in fp:
        s = line.split()
        mode = int(s[0])
        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 no:")
for r in res[0].keys():
    print(res[0][r]/SAMPLES)
print("Average times low:")
for r in res[1].keys():
    print(res[1][r]/SAMPLES)
print("Average times medium:")
for r in res[2].keys():
    print(res[2][r]/SAMPLES)
print("Average times high:")
for r in res[3].keys():
    print(res[3][r]/SAMPLES)