bench-slope: add CPU frequency auto-detection
* tests/bench-slope.c (bench_obj): Add 'hd'. (bench_encrypt_init, bench_encrypt_free, bench_encrypt_do_bench) (bench_decrypt_do_bench, bench_xts_encrypt_init) (bench_xts_encrypt_do_bench, bench_xts_decrypt_do_bench) (bench_ccm_encrypt_init, bench_ccm_encrypt_do_bench) (bench_ccm_decrypt_do_bench, bench_aead_encrypt_init) (bench_aead_encrypt_do_bench, bench_aead_decrypt_do_bench) (bench_hash_init, bench_hash_free, bench_hash_do_bench) (bench_mac_init, bench_mac_free, bench_mac_do_bench): Use 'obj->hd' for storing pointer to crypto context. (auto_ghz): New. (do_slope_benchmark): Rename to... (slope_benchmark): ...this. (auto_ghz_init, auto_ghz_free, auto_ghz_bench, auto_ghz_detect_ops) (get_auto_ghz, do_slope_benchmark): New. (double_to_str): Round number larger than 1000 to integer. (bench_print_result_csv, bench_print_result_std) (bench_print_result, bench_print_header, cipher_bench_one) (hash_bench_one, mac_bench_one, kdf_bench_one, kdf_bench): Add auto-detected frequency printing. (print_help): Help for CPU speed auto-detection mode. (main): Add parsing for "--cpu-mhz auto".
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>