benchtests: include --stats parameter
commit1990185f5ff5a77f07ced4408cd0e5c4de404ad7
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Mon, 10 Dec 2018 21:15:34 +0000 (10 15:15 -0600)
committerLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Wed, 12 Dec 2018 17:05:22 +0000 (12 11:05 -0600)
tree0f088213c0a9cfa495c942f422dbfb4c8d5f0abe
parent587426d499e6ac40dafd9a19dcd12cb6af93f5fc
benchtests: include --stats parameter

Allows user to pick a statistic, defaulting to min and mean, from command
line. At the same time, if stat does not exit, catch the run-time exception
and keep comparing the rest of benchmarked functions. Finally, take care of
division-by-zero exceptions and as the latter, keep comparing the rest of the
functions, turning the script a bit more fault tolerant thus useful.

* benchtests/scripts/compare_bench.py (do_compare): Catch KeyError and
    ZeroDivisorError exceptions.
* benchtests/scripts/compare_bench.py (compare_runs): Use stats argument to
    loop through user provided statistics.
* benchtests/scripts/compare_bench.py (main): Include the --stats argument.
ChangeLog
benchtests/scripts/compare_bench.py