diff options
Diffstat (limited to 'baseline/summarize-uwss.py')
| -rwxr-xr-x | baseline/summarize-uwss.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/baseline/summarize-uwss.py b/baseline/summarize-uwss.py new file mode 100755 index 0000000..f7df269 --- /dev/null +++ b/baseline/summarize-uwss.py | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | res = [] | ||
| 6 | res.append({}) | ||
| 7 | res.append({}) | ||
| 8 | res.append({}) | ||
| 9 | SAMPLES = 500 | ||
| 10 | |||
| 11 | with open(f) as fp: | ||
| 12 | for line in fp: | ||
| 13 | s = line.split() | ||
| 14 | mode = int(s[0])-1 | ||
| 15 | if s[1] not in res[mode]: | ||
| 16 | res[mode][s[1]] = float(s[5]) | ||
| 17 | else: | ||
| 18 | if "finished" not in s[5]: | ||
| 19 | res[mode][s[1]] += float(s[5]) | ||
| 20 | else: | ||
| 21 | res[mode][s[1]] += float(s[7]) | ||
| 22 | |||
| 23 | print("Average times low:") | ||
| 24 | for r in res[0].keys(): | ||
| 25 | print(res[0][r]/SAMPLES) | ||
| 26 | print("Average times medium:") | ||
| 27 | for r in res[1].keys(): | ||
| 28 | print(res[1][r]/SAMPLES) | ||
| 29 | print("Average times high:") | ||
| 30 | for r in res[2].keys(): | ||
| 31 | print(res[2][r]/SAMPLES) | ||
