glibc/benchtests/scripts
Siddhesh Poyarekar 0cd2828695 benchtest: script to compare two benchmarks
This script is a sample implementation that uses import_bench to
construct two benchmark objects and compare them.  If detailed timing
information is available (when one does `make DETAILED=1 bench`), it
writes out graphs for all functions it benchmarks and prints
significant differences in timings of the two benchmark runs.  If
detailed timing information is not available, it points out
significant differences in aggregate times.

Call this script as follows:

  compare_bench.py schema_file.json bench1.out bench2.out

Alternatively, if one wants to set a different threshold for warnings
(default is a 10% difference):

  compare_bench.py schema_file.json bench1.out bench2.out 25

The threshold in the example above is 25%.  schema_file.json is the
JSON schema (which is $srcdir/benchtests/scripts/benchout.schema.json
for the benchmark output file) and bench1.out and bench2.out are the
two benchmark output files to compare.

The key functionality here is the compress_timings function which
groups together points that are close together into a single point
that is the mean of all its representative points.  Any point in such
a group is at most 1.5x the smallest point in that group.  The
detailed derivation is a comment in the function.

	* benchtests/scripts/compare_bench.py: New file.
	* benchtests/scripts/import_bench.py (mean): New function.
	(split_list): Likewise.
	(do_for_all_timings): Likewise.
	(compress_timings): Likewise.
2015-06-01 23:14:11 +05:30
..
bench.py Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
benchout.schema.json Validate bench.out against a JSON schema 2014-06-11 14:16:29 +05:30
compare_bench.py benchtest: script to compare two benchmarks 2015-06-01 23:14:11 +05:30
import_bench.py benchtest: script to compare two benchmarks 2015-06-01 23:14:11 +05:30
validate_benchout.py New module to import and process benchmark output 2015-06-01 23:13:29 +05:30