g5k
This commit is contained in:
parent
08fd52eedb
commit
752055866f
4 changed files with 75 additions and 6 deletions
12
plots.py
12
plots.py
|
|
@ -341,13 +341,19 @@ def cmp_versions(logs, exps, criteria, objs):
|
|||
val12 = float(log12[COL[obj]]) - idle_val[obj] * float(log12["time"])
|
||||
val13 = float(log13[COL[obj]]) - idle_val[obj] * float(log13["time"])
|
||||
# Difference relative to the mean of the two values
|
||||
diff_rel = abs(val12 - val13) / ((val12 + val13) / 2)
|
||||
try:
|
||||
diff_rel = abs(val12 - val13) / ((val12 + val13) / 2)
|
||||
except ZeroDivisionError:
|
||||
continue
|
||||
diff_rel_max[obj] = max(diff_rel_max[obj], diff_rel)
|
||||
diff_rel_sum[obj] += diff_rel
|
||||
diff_rel_num[obj] += 1
|
||||
diff_rel_avg = {obj:diff_rel_sum[obj]/diff_rel_num[obj] for obj in objs}
|
||||
print("Diff rel max: ", diff_rel_max)
|
||||
print("Diff rel avg: ", diff_rel_avg)
|
||||
try:
|
||||
diff_rel_avg = {obj:diff_rel_sum[obj]/diff_rel_num[obj] for obj in objs}
|
||||
print("Diff rel avg: ", diff_rel_avg)
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
def getargv(arg:str, default="", n:int=1, args:list=sys.argv):
|
||||
if arg in args and len(args) > args.index(arg)+n:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue