Commit 7560b387 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Niels Möller
Browse files

Allow user to specify multiple algorithms to nettle-benchmark


Signed-off-by: Dmitry Baryshkov's avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
parent c380faf7
......@@ -809,7 +809,7 @@ main(int argc, char **argv)
break;
case OPT_HELP:
printf("Usage: nettle-benchmark [-f clock frequency] [alg]\n");
printf("Usage: nettle-benchmark [-f clock frequency] [alg...]\n");
return EXIT_SUCCESS;
case '?':
......@@ -819,8 +819,6 @@ main(int argc, char **argv)
abort();
}
alg = argv[optind];
time_init();
bench_sha1_compress();
bench_salsa20_core();
......@@ -830,6 +828,10 @@ main(int argc, char **argv)
header();
do
{
alg = argv[optind];
if (!alg || strstr ("memxor", alg))
{
time_memxor();
......@@ -854,5 +856,8 @@ main(int argc, char **argv)
if (!alg || strstr(aeads[i]->name, alg))
time_aead(aeads[i]);
optind++;
} while (alg && argv[optind]);
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment