tests/bench-slope: avoid divide by zero
* tests/bench-slope.c (safe_div): New. (get_slope): Make static; Skip if number of points is too small; Use safe_div. (do_slope_benchmark): Retry benchmark if result does not make sense; Limit retries to 4 for non-auto-ghz and 1000 for auto-ghz. (get_auto_ghz, do_slope_benchmark, bench_print_result_csv) (bench_print_result_std): Use safe_div.
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>