From a48033b307acbafe62fdfc58c211c0edd78a7d5b Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Mon, 21 Nov 2016 09:13:00 +0100 Subject: [PATCH] Print the average misses number. --- analysis.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/analysis.py b/analysis.py index c36ed9a..6c0b20e 100755 --- a/analysis.py +++ b/analysis.py @@ -63,8 +63,11 @@ def main(): s2s = 0 e2e = 0 misses = 0 + misses_avrg = 0 + exec_cnt = 0 response = 0 for task_id, task in instances.items(): + exec_cnt += tasks[task_id]['executions'] s2s += math.sqrt(task['s2s'] / tasks[task_id]['executions']) e2e += math.sqrt(task['e2e'] / tasks[task_id]['executions']) misses += task['misses'] @@ -73,6 +76,7 @@ def main(): s2s /= len(tasks) e2e /= len(tasks) response /= len(tasks) + misses_avrg /= exec_cnt outkey = round(util, 2) @@ -96,6 +100,11 @@ def main(): for elem in value: print('{}; {}'.format(key, elem[2]), file=missesfile) + with open('analysis/misses_avrg.dat', 'w') as missesavrgfile: + for key, value in out.items(): + for elem in value: + print('{}; {}'.format(key, elem[3]), file=missesavrgfile) + with open('analysis/response.dat', 'w') as responsefile: for key, value in out.items(): for elem in value: -- libgit2 0.26.0