Skip to content

Commit

Permalink
add a 1000 iteration container open/close loop after warmup
Browse files Browse the repository at this point in the history
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_daos_container
Skip-func-test-vm: true
Skip-func-hw-test-medium-verbs-provider: true
Skip-func-hw-test-medium-verbs-provider-md-on-ssd: true
Skip-func-hw-test-medium-ucx-provider: true
Skip-func-hw-test-medium: false
Skip-func-hw-test-medium-md-on-ssd: false

Signed-off-by: Kenneth Cain <[email protected]>
  • Loading branch information
kccain committed Aug 28, 2024
1 parent 01a4713 commit 5fd3383
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/tests/suite/daos_container.c
Original file line number Diff line number Diff line change
Expand Up @@ -3841,6 +3841,7 @@ co_op_dup_timing(void **state)
const uint32_t SVC_OPS_ENTRY_AGE = 60;
bool fp_loop_failed = false;
double dummy_wl_elapsed = 0.0;
double open_close_1k_el = 0.0;
daos_pool_info_t pinfo;
d_rank_t leader_rank;
int i; /* loop over NUM_FP */
Expand Down Expand Up @@ -3923,11 +3924,33 @@ co_op_dup_timing(void **state)
}
t_end = daos_get_ntime();
dummy_wl_elapsed = (double)(t_end - t_begin) / NSEC_PER_SEC;
rc = daos_cont_destroy(arg->pool.poh, contstr, 0 /* force */, NULL);
assert_rc_equal(rc, 0);

print_message("done dummy workload: %u open/close pairs in %8.3f sec\n", num_opens,
dummy_wl_elapsed);

/* Now, let's do 1000 container open/close pairs and time it, after we
* have done the above dummy workload loop to fill the pool's svc_ops KVS.
*/
num_opens = 0;
t_begin = daos_get_ntime();
for (;;) {
rc = daos_cont_open(arg->pool.poh, contstr, DAOS_COO_RW, &dummy_coh,
NULL /* info */, NULL /* ev */);
assert_rc_equal(rc, 0);

rc = daos_cont_close(dummy_coh, NULL /* ev */);
assert_rc_equal(rc, 0);

num_opens++;
if (num_opens == 1000)
break;
}
t_end = daos_get_ntime();
open_close_1k_el = (double)(t_end - t_begin) / NSEC_PER_SEC;
print_message("1K open/close pairs in %8.3f sec\n", open_close_1k_el);

rc = daos_cont_destroy(arg->pool.poh, contstr, 0 /* force */, NULL);
assert_rc_equal(rc, 0);
}

/* configure periodic fault injection loops */
Expand Down

0 comments on commit 5fd3383

Please sign in to comment.