diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2020-05-29 12:56:36 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2020-05-29 12:56:36 -0400 |
commit | 7b715ab6c23af2695f58917ffe6e5df3b14ab360 (patch) | |
tree | 8ad92a96a3565ecbee37a49cf2beb47d15f7eb38 /baseline/summarize-uwss2.py | |
parent | 8dfefc152f16f9fd9e8aa0910fd4d23d6543d87e (diff) |
Add remaining scripts from Joshua's PRP experimentsfor-jbakita-prp
***This is the final commit which supports reproducing his
PRP results***
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) | ||