Skip to content

Commit 1b1bfec

Browse files
committed
Fix completed timestamp in some cases
Fix the condition when filling completed timestamp of last iteration. Signed-off-by: Firas Jahjah <[email protected]>
1 parent fe52477 commit 1b1bfec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/perftest_resources.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4708,7 +4708,7 @@ int run_iter_bi(struct pingpong_context *ctx,
47084708
ctx->ccnt[(int)credit_wc.wr_id] += user_param->cq_mod;
47094709

47104710
if (user_param->noPeak == OFF) {
4711-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
4711+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
47124712
user_param->tcompleted[tot_iters - 1] = get_cycles();
47134713
else
47144714
user_param->tcompleted[totccnt-1] = get_cycles();
@@ -4770,7 +4770,7 @@ int run_iter_bi(struct pingpong_context *ctx,
47704770

47714771
if (user_param->noPeak == OFF) {
47724772

4773-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
4773+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
47744774
user_param->tcompleted[tot_iters - 1] = get_cycles();
47754775
else
47764776
user_param->tcompleted[totccnt-1] = get_cycles();

src/raw_ethernet_resources.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ int run_iter_fw(struct pingpong_context *ctx,struct perftest_parameters *user_pa
12511251

12521252
if (user_param->noPeak == OFF) {
12531253

1254-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
1254+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
12551255
user_param->tcompleted[tot_iters - 1] = get_cycles();
12561256
else
12571257
user_param->tcompleted[totccnt - 1] = get_cycles();

0 commit comments

Comments
 (0)