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-uwss.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-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) | ||