tests: Add --csv option to bench-slope.
authorWerner Koch <wk@gnupg.org>
Tue, 22 Oct 2013 12:26:53 +0000 (14:26 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 9 Dec 2013 07:35:48 +0000 (08:35 +0100)
commit8072e9fa4b42ae8e65e266aa158fd903f1bb0927
treea189ef05c454f6b46de4bfe3f00e762f25423580
parentd4555433b6e422fa69a85cae99961f513e55d82b
tests: Add --csv option to bench-slope.

* tests/bench-slope.c (STR, STR2): New.
(cvs_mode): New.
(num_measurement_repetitions): New.  Replace use of
NUM_MEASUREMENT_REPETITIONS by this.
(current_section_name, current_algo_name, current_mode_name): New.
(bench_print_result_csv): New.
(bench_print_result_std): Rename from bench_print_result.
(bench_print_result): New. Divert depending on CSV_MODE.
(bench_print_header, bench_print_footer): take care of CSV_MODE.
(bench_print_algo, bench_print_mode): New.  Use them instead of
explicit printfs.
(main): Add options --csv and --repetitions.

Signed-off-by: Werner Koch <wk@gnupg.org>
tests/bench-slope.c