summaryrefslogtreecommitdiffstats
path: root/dis/summarize.py
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-10-17 15:36:30 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-17 15:46:22 -0400
commit5aad2261f7c012aa16a93c7c5bf6bda0081658fb (patch)
treed9ff8f87b4613639c214032eb3fcf14967d76b5f /dis/summarize.py
parent97c1685def13be3724a6d025f4e12f236777a911 (diff)
Add updated DIS post-processing scripts from (rejected) RTSS'20 paper
These are compatible with the outputs of all the DIS stressmarks as instumented with `extra.h`.
Diffstat (limited to 'dis/summarize.py')
-rwxr-xr-xdis/summarize.py36
1 files changed, 17 insertions, 19 deletions
diff --git a/dis/summarize.py b/dis/summarize.py
index f8f6929..31dcccc 100755
--- a/dis/summarize.py
+++ b/dis/summarize.py
@@ -2,6 +2,8 @@
2import sys 2import sys
3 3
4f = sys.argv[1] 4f = sys.argv[1]
5if len(sys.argv) < 2:
6 print("Usage "+sys.argv[0]+" <filename> --inf-precision")
5res = {} 7res = {}
6mem_res = {} 8mem_res = {}
7memw_res = {} 9memw_res = {}
@@ -48,24 +50,20 @@ def percentile(N, percent, key=lambda x:x):
48 d1 = key(N[int(c)]) * (k-f) 50 d1 = key(N[int(c)]) * (k-f)
49 return d0+d1 51 return d0+d1
50## end of http://code.activestate.com/recipes/511478/ }}} 52## end of http://code.activestate.com/recipes/511478/ }}}
51""" 53avg_max = 0
52print("Average times:") 54avg_99th = 0
53for r in res.keys(): 55avg_avg = 0
54 print(res[r]/samples[r])
55
56print("Average memory read:")
57for r in mem_res.keys():
58 print(mem_res[r]/samples[r])
59
60print("Average memory write:")
61for r in memw_res.keys():
62 print(memw_res[r]/samples[r])
63
64print("Max times:")
65for r in max_res.keys():
66 print(max_res[r])
67"""
68print("Name\t\tAverage\t\tMax\t\t99th %\t\tAvg Mem Read\tAvg Mem Write\t") 56print("Name\t\tAverage\t\tMax\t\t99th %\t\tAvg Mem Read\tAvg Mem Write\t")
69for r in res.keys(): 57for r in sorted(res.keys()):
70# print(r + "\t\t" + str(res[r]/samples[r]) + "\t\t" + str(max_res[r])) 58# print(r + "\t\t" + str(res[r]/samples[r]) + "\t\t" + str(max_res[r]))
71 print("{:12}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}".format(r, sum(res[r])/len(res[r]), max(res[r]), percentile(sorted(res[r]), 0.99), mem_res[r]/samples[r], memw_res[r]/samples[r])) 59 avg_avg += sum(res[r])/len(res[r])
60 avg_max += max(res[r])
61 avg_99th += percentile(sorted(res[r]), 0.99)
62 if len(sys.argv) > 2 and sys.argv[2] == "--inf-precision":
63 print("{:12}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}".format(r, sum(res[r])/len(res[r]), max(res[r]), percentile(sorted(res[r]), 0.99), mem_res[r]/samples[r], memw_res[r]/samples[r]))
64 else:
65 print("{:12.12}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}\t{:>12.0f}".format(r, sum(res[r])/len(res[r]), max(res[r]), percentile(sorted(res[r]), 0.99), mem_res[r]/samples[r], memw_res[r]/samples[r]))
66
67print("Average average:", avg_avg/len(res.keys()))
68print("Average max:", avg_max/len(res.keys()))
69print("Average 99th:", avg_99th/len(res.keys()))