summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
author张盛豪 <zhangshenghao1995@163.com>2020-04-16 22:34:24 +0800
committerPaul Yang <kaishen.yy@antfin.com>2020-04-18 11:47:50 +0800
commit031c9bd3f3e9a02fa126c7dbc47f3d934678a195 (patch)
tree33f4759351e0ab307cde64e7eb19e2f46f704cd9 /apps/speed.c
parentad16671d49208ea8dcc79613e14fe6148daf959b (diff)
apps/speed: fix invalid final report when run SM2 benchmarks in parallel
Fixed #11523 CLA: trivial Signed-off-by: 张盛豪 <zhangshenghao1995@163.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Yang <kaishen.yy@antfin.com> (Merged from https://github.com/openssl/openssl/pull/11557)
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 9d4ab2c330..c063520df9 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -3467,7 +3467,7 @@ int speed_main(int argc, char **argv)
d = Time_F(STOP);
BIO_printf(bio_err,
- mr ? "+R8:%ld:%u:%s:%.2f\n" :
+ mr ? "+R10:%ld:%u:%s:%.2f\n" :
"%ld %u bits %s signs in %.2fs \n",
count, sm2_curves[testnum].bits,
sm2_curves[testnum].name, d);
@@ -3496,7 +3496,7 @@ int speed_main(int argc, char **argv)
count = run_benchmark(async_jobs, SM2_verify_loop, loopargs);
d = Time_F(STOP);
BIO_printf(bio_err,
- mr ? "+R9:%ld:%u:%s:%.2f\n"
+ mr ? "+R11:%ld:%u:%s:%.2f\n"
: "%ld %u bits %s verify in %.2fs\n",
count, sm2_curves[testnum].bits,
sm2_curves[testnum].name, d);
@@ -3678,7 +3678,7 @@ int speed_main(int argc, char **argv)
}
if (mr)
- printf("+F6:%u:%u:%s:%f:%f\n",
+ printf("+F7:%u:%u:%s:%f:%f\n",
k, sm2_curves[k].bits, sm2_curves[k].name,
sm2_results[k][0], sm2_results[k][1]);
else
@@ -3974,6 +3974,7 @@ static int do_multi(int multi, int size_num)
p = buf + 4;
k = atoi(sstrsep(&p, sep));
sstrsep(&p, sep);
+ sstrsep(&p, sep);
d = atof(sstrsep(&p, sep));
sm2_results[k][0] += d;