2018-12-12 Leonardo Sandoval <leonardo.sandoval.gonzalez@intel.com>
+ * benchtests/scripts/compare_bench.py (do_compare): write to
+ stderr in casestat is not present.
+ * benchtests/scripts/compare_bench.py (plot_graphs): write to
+ stderr in case timings field is not present. Also string showing
+ the output filename goes into the stderr.
+
+2018-12-12 Leonardo Sandoval <leonardo.sandoval.gonzalez@intel.com>
+
* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError
and ZeroDivisorError exceptions.
* benchtests/scripts/compare_bench.py (compare_runs): Use stats
v2 = tl2[str(par)]
d = abs(v2 - v1) * 100 / v1
except KeyError:
+ sys.stderr.write('%s(%s)[%s]: stat does not exist\n' % (func, var, par))
return
except ZeroDivisionError:
return
# timing info for the function variant.
if 'timings' not in pts1['functions'][func][var].keys() or \
'timings' not in pts2['functions'][func][var].keys():
- continue
+ continue
# If two lists do not have the same length then it is likely that
# the performance characteristics of the function have changed.
# No point trying to print a graph if there are no detailed
# timings.
if u'timings' not in bench1['functions'][func][var].keys():
- print('Skipping graph for %s(%s)' % (func, var))
+ sys.stderr.write('Skipping graph for %s(%s)\n' % (func, var))
continue
pylab.clf()
filename = "%s-%s.png" % (func, var)
else:
filename = "%s.png" % func
- print('Writing out %s' % filename)
+ sys.stderr.write('Writing out %s' % filename)
pylab.savefig(filename)
def main(bench1, bench2, schema, threshold, stats):