diff options
Diffstat (limited to 'baseline/summarize-uwss2.py')
| -rwxr-xr-x | baseline/summarize-uwss2.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/baseline/summarize-uwss2.py b/baseline/summarize-uwss2.py new file mode 100755 index 0000000..bf3d3ea --- /dev/null +++ b/baseline/summarize-uwss2.py | |||
| @@ -0,0 +1,35 @@ | |||
| 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 | res.append({}) | ||
| 10 | SAMPLES = 50 | ||
| 11 | |||
| 12 | with open(f) as fp: | ||
| 13 | for line in fp: | ||
| 14 | s = line.split() | ||
| 15 | mode = int(s[0]) | ||
| 16 | if s[1] not in res[mode]: | ||
| 17 | res[mode][s[1]] = float(s[5]) | ||
| 18 | else: | ||
| 19 | if "finished" not in s[5]: | ||
| 20 | res[mode][s[1]] += float(s[5]) | ||
| 21 | else: | ||
| 22 | res[mode][s[1]] += float(s[7]) | ||
| 23 | |||
| 24 | print("Average times no:") | ||
| 25 | for r in res[0].keys(): | ||
| 26 | print(res[0][r]/SAMPLES) | ||
| 27 | print("Average times low:") | ||
| 28 | for r in res[1].keys(): | ||
| 29 | print(res[1][r]/SAMPLES) | ||
| 30 | print("Average times medium:") | ||
| 31 | for r in res[2].keys(): | ||
| 32 | print(res[2][r]/SAMPLES) | ||
| 33 | print("Average times high:") | ||
| 34 | for r in res[3].keys(): | ||
| 35 | print(res[3][r]/SAMPLES) | ||
