CMSIS-DSP: Corrected formatting bug in test script

pull/19/head
Christophe Favergeon 5 years ago
parent 4577b46487
commit 9a39198d7c

@ -828,7 +828,10 @@ def formatPerfRatio(s):
if args.clamp:
if t > args.clampval:
t = args.clampval
result.append(("%.3f" % t))
if t < 0.0:
result.append("NA")
else:
result.append(("%.3f" % t))
else:
result.append(s)
@ -854,7 +857,7 @@ def addRatioTable(cols,params,data,section,testNames,byd):
if byd:
data=ref.pivot_table(index=toSort, columns=['type'],
values=["ratio"], aggfunc='first')
values=["ratio"], aggfunc='first',fill_value=-1.0)
else:
data=ref.pivot_table(index=toSort, columns=['core'],
values=["ratio"], aggfunc='first')
@ -868,6 +871,14 @@ def addRatioTable(cols,params,data,section,testNames,byd):
dataTable=Table(params,cores)
if args.g:
if type(dataForFunc) is not pd.DataFrame:
sec=Section("Graph")
testSection.addSection(sec)
barChart=BarChart(zip(cores,dataForFunc))
sec.addContent(barChart)
ratioSection.addContent(Text("A bigger ratio means the reference core \"%s\" is better" % refCoreName))
ratioSection.addContent(dataTable)

Loading…
Cancel
Save