From 031c9bd3f3e9a02fa126c7dbc47f3d934678a195 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E7=9B=9B=E8=B1=AA?= Date: Thu, 16 Apr 2020 22:34:24 +0800 Subject: [PATCH] apps/speed: fix invalid final report when run SM2 benchmarks in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixed #11523 CLA: trivial Signed-off-by: 张盛豪 Reviewed-by: Richard Levitte Reviewed-by: Paul Yang (Merged from https://github.com/openssl/openssl/pull/11557) --- apps/speed.c | 7 ++++--- 1 file 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; -- 2.25.1