From 2cde8430930e1eaf5f27a385235758918e38e4ac Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Wed, 1 Nov 2023 16:47:21 -0600 Subject: [PATCH] Measure max & min durations within the confines of MAX_SAMPLE_RUNS --- wolfcrypt/benchmark/benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index cf533c353..6c950e4dc 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -254,12 +254,12 @@ }\ else {\ delta = current_time(0) - prev;\ + }\ + if (runs < MAX_SAMPLE_RUNS) {\ if (max < delta)\ max = delta;\ else if (min > delta)\ min = delta;\ - }\ - if (runs < MAX_SAMPLE_RUNS) {\ deltas[runs] = delta;\ sum += delta;\ runs++;\