Skip to content

Commit

Permalink
DAOS-13584 tests: limit pool query test time (#12451) (#13578)
Browse files Browse the repository at this point in the history
Signed-off-by: Wang Shilong <shilong.wang@intel.com>
  • Loading branch information
kccain committed Jan 22, 2024
1 parent 7556ffb commit 8b5ffa6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/tests/suite/daos_md_replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ mdr_stop_pool_svc(void **argv)
} else {
int n = 10000 / arg->rank_size;
int i;
uint64_t t_start, t_end, duration = 0;

t_start = daos_get_ntime();
/* Generate some concurrent requests. */
print_message("repeating %d queries: begin\n", n);
for (i = 0; i < n; i++) {
Expand All @@ -85,8 +87,19 @@ mdr_stop_pool_svc(void **argv)
NULL /* properties */,
NULL /* ev */);
assert_rc_equal(rc, 0);
if (i % 10 == 0) {
t_end = daos_get_ntime();
duration = (t_end - t_start) / NSEC_PER_SEC;
if (duration >= 15)
break;
}
}
print_message("repeating %d queries: end\n", n);
if (duration == 0) {
t_end = daos_get_ntime();
duration = (t_end - t_start) / NSEC_PER_SEC;
}
print_message("repeating %d queries, duration: %lu seconds end\n",
i, duration);
}

par_barrier(PAR_COMM_WORLD);
Expand Down

0 comments on commit 8b5ffa6

Please sign in to comment.