mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
benchtests: send non-consumable data to stderr
Non-consumable data, alias data not related to benchmarks, should be sent to the standard error, thus pipelines can work as expected. * benchtests/scripts/compare_bench.py (do_compare): write to stderr in case stat 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.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2018-12-12 Leonardo Sandoval <leonardo.sandoval.gonzalez@intel.com>
|
||||||
|
|
||||||
* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError
|
* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError
|
||||||
|
@@ -47,6 +47,7 @@ def do_compare(func, var, tl1, tl2, par, threshold):
|
|||||||
v2 = tl2[str(par)]
|
v2 = tl2[str(par)]
|
||||||
d = abs(v2 - v1) * 100 / v1
|
d = abs(v2 - v1) * 100 / v1
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
sys.stderr.write('%s(%s)[%s]: stat does not exist\n' % (func, var, par))
|
||||||
return
|
return
|
||||||
except ZeroDivisionError:
|
except ZeroDivisionError:
|
||||||
return
|
return
|
||||||
@@ -85,7 +86,7 @@ def compare_runs(pts1, pts2, threshold, stats):
|
|||||||
# timing info for the function variant.
|
# timing info for the function variant.
|
||||||
if 'timings' not in pts1['functions'][func][var].keys() or \
|
if 'timings' not in pts1['functions'][func][var].keys() or \
|
||||||
'timings' not in pts2['functions'][func][var].keys():
|
'timings' not in pts2['functions'][func][var].keys():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# If two lists do not have the same length then it is likely that
|
# If two lists do not have the same length then it is likely that
|
||||||
# the performance characteristics of the function have changed.
|
# the performance characteristics of the function have changed.
|
||||||
@@ -133,7 +134,7 @@ def plot_graphs(bench1, bench2):
|
|||||||
# No point trying to print a graph if there are no detailed
|
# No point trying to print a graph if there are no detailed
|
||||||
# timings.
|
# timings.
|
||||||
if u'timings' not in bench1['functions'][func][var].keys():
|
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
|
continue
|
||||||
|
|
||||||
pylab.clf()
|
pylab.clf()
|
||||||
@@ -157,7 +158,7 @@ def plot_graphs(bench1, bench2):
|
|||||||
filename = "%s-%s.png" % (func, var)
|
filename = "%s-%s.png" % (func, var)
|
||||||
else:
|
else:
|
||||||
filename = "%s.png" % func
|
filename = "%s.png" % func
|
||||||
print('Writing out %s' % filename)
|
sys.stderr.write('Writing out %s' % filename)
|
||||||
pylab.savefig(filename)
|
pylab.savefig(filename)
|
||||||
|
|
||||||
def main(bench1, bench2, schema, threshold, stats):
|
def main(bench1, bench2, schema, threshold, stats):
|
||||||
|
Reference in New Issue
Block a user