mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-04 06:03:10 +00:00
Fix max value for tta
This commit is contained in:
parent
b36a94e269
commit
c7f9577d45
@ -85,6 +85,8 @@ class Visualizer:
|
|||||||
def averageRuns(self, data, runs):
|
def averageRuns(self, data, runs):
|
||||||
"""Get the average of run 0 and run 1 for each key"""
|
"""Get the average of run 0 and run 1 for each key"""
|
||||||
newData = {}
|
newData = {}
|
||||||
|
allTta = []
|
||||||
|
print("Getting the average of the runs...")
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
runExists = False
|
runExists = False
|
||||||
"""Check if the key contains 'run_' with a numerical value"""
|
"""Check if the key contains 'run_' with a numerical value"""
|
||||||
@ -97,12 +99,15 @@ class Visualizer:
|
|||||||
"""Create a new key with the other items in the tuple"""
|
"""Create a new key with the other items in the tuple"""
|
||||||
if item.startswith('run_'):
|
if item.startswith('run_'):
|
||||||
newKey = tuple([x for x in key if x != item])
|
newKey = tuple([x for x in key if x != item])
|
||||||
|
print(newKey)
|
||||||
"""Average the similar key values"""
|
"""Average the similar key values"""
|
||||||
total = [0] * len(data[key]['ttas'])
|
total = [0] * len(data[key]['ttas'])
|
||||||
for i in range(runs):
|
for i in range(runs):
|
||||||
key0 = (f'run_{i}',) + newKey
|
key0 = (f'run_{i}',) + newKey
|
||||||
for cnt, tta in enumerate(data[key0]['ttas']):
|
for cnt, tta in enumerate(data[key0]['ttas']):
|
||||||
total[cnt] += tta
|
total[cnt] += tta
|
||||||
|
allTta.append(tta)
|
||||||
|
print(tta)
|
||||||
for i in range(len(total)):
|
for i in range(len(total)):
|
||||||
total[i] = total[i]/runs
|
total[i] = total[i]/runs
|
||||||
averages = {}
|
averages = {}
|
||||||
@ -112,7 +117,7 @@ class Visualizer:
|
|||||||
else:
|
else:
|
||||||
averages[subkey] = data[key][subkey]
|
averages[subkey] = data[key][subkey]
|
||||||
newData[newKey] = averages
|
newData[newKey] = averages
|
||||||
print("Getting the average of the runs...")
|
self.maxTTA = max(allTta) + 10
|
||||||
return newData
|
return newData
|
||||||
|
|
||||||
def similarKeys(self, data):
|
def similarKeys(self, data):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user