Commit d91a2e97 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Exit statistics to output max 2 decimals

parent 4f207d32
...@@ -24,10 +24,11 @@ class DefaultTabularExit(plugin.OutputPreparationPlugin): ...@@ -24,10 +24,11 @@ class DefaultTabularExit(plugin.OutputPreparationPlugin):
# when found, add a row with the results of the specific exit # when found, add a row with the results of the specific exit
if family=='Exit': if family=='Exit':
exitId=record['id'] exitId=record['id']
throughput=record['results'].get('throughput','undefined') print record['results'].get('throughput','undefined')
taktTime=record['results'].get('takt_time','undefined') throughput=int((record['results'].get('throughput','undefined'))[0])
lifespan=record['results'].get('lifespan','undefined') taktTime=float((record['results'].get('takt_time','undefined'))[0])
data['result']['result_list'][0]['exit_output'].append([exitId,throughput,taktTime,lifespan]) lifespan=float((record['results'].get('lifespan','undefined'))[0])
data['result']['result_list'][0]['exit_output'].append([exitId,throughput,round(taktTime,2),round(lifespan,2)])
elif numberOfReplications>1: elif numberOfReplications>1:
# create the titles of the columns # create the titles of the columns
data['result']['result_list'][0]['exit_output'] = [['Exit Id','','Throughput','' , '','Takt Time','','', 'Lifespan',''], data['result']['result_list'][0]['exit_output'] = [['Exit Id','','Throughput','' , '','Takt Time','','', 'Lifespan',''],
...@@ -41,9 +42,16 @@ class DefaultTabularExit(plugin.OutputPreparationPlugin): ...@@ -41,9 +42,16 @@ class DefaultTabularExit(plugin.OutputPreparationPlugin):
taktTime=self.getConfidenceInterval(record['results'].get('takt_time','undefined'),confidenceLevel) taktTime=self.getConfidenceInterval(record['results'].get('takt_time','undefined'),confidenceLevel)
lifespan=self.getConfidenceInterval(record['results'].get('lifespan','undefined'),confidenceLevel) lifespan=self.getConfidenceInterval(record['results'].get('lifespan','undefined'),confidenceLevel)
data['result']['result_list'][0]['exit_output'].append([exitId, data['result']['result_list'][0]['exit_output'].append([exitId,
throughput['lb'],throughput['avg'],throughput['ub'], round(float(throughput['lb']),2),
taktTime['lb'],taktTime['avg'],taktTime['ub'], round(float(throughput['avg']),2),
lifespan['lb'],lifespan['avg'],lifespan['ub']]) round(float(throughput['ub']),2),
round(float(taktTime['lb']),2),
round(float(taktTime['avg']),2),
round(float(taktTime['ub']),2),
round(float(lifespan['lb']),2),
round(float(lifespan['avg']),2),
round(float(lifespan['ub']),2)
])
return data return data
def getConfidenceInterval(self, value_list, confidenceLevel): def getConfidenceInterval(self, value_list, confidenceLevel):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment