diff --git a/src/tests/perf_checkpoint_var.cc b/src/tests/perf_checkpoint_var.cc index 5a4d1049529..846a3b46867 100644 --- a/src/tests/perf_checkpoint_var.cc +++ b/src/tests/perf_checkpoint_var.cc @@ -92,7 +92,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { myargs[i].operation = checkpoint_var; myargs[i].operation_extra = &val_size; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_child_txn.cc b/src/tests/perf_child_txn.cc index 723e15fb703..9559e8bb991 100644 --- a/src/tests/perf_child_txn.cc +++ b/src/tests/perf_child_txn.cc @@ -41,7 +41,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = create_child_txn; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_cursor_nop.cc b/src/tests/perf_cursor_nop.cc index 2f4553cb8a1..49827b6f8e5 100644 --- a/src/tests/perf_cursor_nop.cc +++ b/src/tests/perf_cursor_nop.cc @@ -35,7 +35,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = cursor_create_close_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_insert.cc b/src/tests/perf_insert.cc index 3745d9b9433..43a1f07f4d7 100644 --- a/src/tests/perf_insert.cc +++ b/src/tests/perf_insert.cc @@ -38,7 +38,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { } } const bool crash_at_end = false; - run_workers(myargs, num_threads, cli_args->time_of_test, crash_at_end, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, crash_at_end, cli_args); } int diff --git a/src/tests/perf_insert_multiple.cc b/src/tests/perf_insert_multiple.cc index 42534901f75..5260fc06998 100644 --- a/src/tests/perf_insert_multiple.cc +++ b/src/tests/perf_insert_multiple.cc @@ -34,7 +34,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { } } const bool crash_at_end = false; - run_workers(myargs, num_threads, cli_args->time_of_test, crash_at_end, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, crash_at_end, cli_args); } int diff --git a/src/tests/perf_malloc_free.cc b/src/tests/perf_malloc_free.cc index 2174d58fe2e..a017fd2084e 100644 --- a/src/tests/perf_malloc_free.cc +++ b/src/tests/perf_malloc_free.cc @@ -29,7 +29,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = malloc_free_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_nop.cc b/src/tests/perf_nop.cc index 343c6836eb8..b31c98979c5 100644 --- a/src/tests/perf_nop.cc +++ b/src/tests/perf_nop.cc @@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = nop; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_ptquery.cc b/src/tests/perf_ptquery.cc index 7c155943251..cda020699b1 100644 --- a/src/tests/perf_ptquery.cc +++ b/src/tests/perf_ptquery.cc @@ -55,7 +55,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_ptquery2.cc b/src/tests/perf_ptquery2.cc index c314ddca53f..1c0af8a0b55 100644 --- a/src/tests/perf_ptquery2.cc +++ b/src/tests/perf_ptquery2.cc @@ -68,7 +68,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op2; myargs[i].operation_extra = &thread_ids[i]; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_read_write.cc b/src/tests/perf_read_write.cc index 49d633c065a..686deb83b26 100644 --- a/src/tests/perf_read_write.cc +++ b/src/tests/perf_read_write.cc @@ -66,7 +66,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { myargs[i].operation = perf_read; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/perf_txn_single_thread.cc b/src/tests/perf_txn_single_thread.cc index 18aeae6fe8b..2311788e53d 100644 --- a/src/tests/perf_txn_single_thread.cc +++ b/src/tests/perf_txn_single_thread.cc @@ -51,7 +51,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myarg, dbp, env, cli_args); myarg.operation = commit_and_create_txn; - run_workers(&myarg, 1, cli_args->time_of_test, false, cli_args); + run_workers(&myarg, 1, cli_args->num_seconds, false, cli_args); for (int i = 0; i < num_txns; i++) { int chk_r = txns[i]->commit(txns[i], 0); diff --git a/src/tests/perf_xmalloc_free.cc b/src/tests/perf_xmalloc_free.cc index b8d0f15c3a0..a0d8efeb35b 100644 --- a/src/tests/perf_xmalloc_free.cc +++ b/src/tests/perf_xmalloc_free.cc @@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = xmalloc_free_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/recover-test_crash_in_flusher_thread.h b/src/tests/recover-test_crash_in_flusher_thread.h index 5a6356715ab..2a1fd374d03 100644 --- a/src/tests/recover-test_crash_in_flusher_thread.h +++ b/src/tests/recover-test_crash_in_flusher_thread.h @@ -68,14 +68,14 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { //myargs[0].update_pad_frequency = 0; db_env_set_flusher_thread_callback(flt_callback, env); - run_workers(myargs, num_threads, cli_args->time_of_test, true, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, true, cli_args); } static int run_recover_flt_test(int argc, char *const argv[]) { struct cli_args args = get_default_args(); // make test time arbitrarily high because we expect a crash - args.time_of_test = 1000000000; + args.num_seconds = 1000000000; args.num_elements = 2000; // we want to induce a checkpoint args.env_args.checkpointing_period = 0; diff --git a/src/tests/recover-test_stress1.cc b/src/tests/recover-test_stress1.cc index 3eb2a9349bd..73bd8902962 100644 --- a/src/tests/recover-test_stress1.cc +++ b/src/tests/recover-test_stress1.cc @@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].do_prepare = true; } - int num_seconds = random() % cli_args->time_of_test; + int num_seconds = random() % cli_args->num_seconds; run_workers(myargs, num_threads, num_seconds, true, cli_args); } diff --git a/src/tests/recover-test_stress2.cc b/src/tests/recover-test_stress2.cc index eeec9d7014a..c2689148436 100644 --- a/src/tests/recover-test_stress2.cc +++ b/src/tests/recover-test_stress2.cc @@ -30,7 +30,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } - int num_seconds = random() % cli_args->time_of_test; + int num_seconds = random() % cli_args->num_seconds; run_workers(myargs, num_threads, num_seconds, true, cli_args); } diff --git a/src/tests/recover-test_stress3.cc b/src/tests/recover-test_stress3.cc index bd19a47b5c4..6eab2885a86 100644 --- a/src/tests/recover-test_stress3.cc +++ b/src/tests/recover-test_stress3.cc @@ -126,7 +126,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } db_env_set_checkpoint_callback2(checkpoint_callback2, NULL); - time_til_crash = random() % cli_args->time_of_test; + time_til_crash = random() % cli_args->num_seconds; start_time = get_tnow(); run_workers(myargs, num_threads, INT32_MAX, true, cli_args); } diff --git a/src/tests/stress-gc2.cc b/src/tests/stress-gc2.cc index a7ed18cb0de..fbbd5f13906 100644 --- a/src/tests/stress-gc2.cc +++ b/src/tests/stress-gc2.cc @@ -33,14 +33,14 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { arg_init(&myargs[i], dbp, env, cli_args); myargs[i].operation = random_sleep; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int test_main(int UU(argc), char *const UU(argv[])) { struct cli_args args = get_default_args_for_perf(); db_env_set_mvcc_garbage_collection_verification(1); - args.time_of_test = 60; + args.num_seconds = 60; args.num_ptquery_threads = 12; stress_test_main(&args); return 0; diff --git a/src/tests/stress_openclose.h b/src/tests/stress_openclose.h index dc0802e345e..ccb5c09e4df 100644 --- a/src/tests/stress_openclose.h +++ b/src/tests/stress_openclose.h @@ -229,7 +229,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { // stress_openclose_crash_at_end should be changed to true or false, // depending if this test is for recovery or not. const bool crash_at_end = stress_openclose_crash_at_end; - run_workers(myargs, total_threads, cli_args->time_of_test, crash_at_end, cli_args); + run_workers(myargs, total_threads, cli_args->num_seconds, crash_at_end, cli_args); // the stress test is now complete. get ready for shutdown/close. // diff --git a/src/tests/test_stress0.cc b/src/tests/test_stress0.cc index d3db1df532b..e23b8b79cf0 100644 --- a/src/tests/test_stress0.cc +++ b/src/tests/test_stress0.cc @@ -53,7 +53,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].prelock_updates = i < 4 ? true : false; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress1.cc b/src/tests/test_stress1.cc index 12ca71bff2f..ccb1525ac85 100644 --- a/src/tests/test_stress1.cc +++ b/src/tests/test_stress1.cc @@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].do_prepare = true; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress2.cc b/src/tests/test_stress2.cc index 3391351565d..cfe6d844eda 100644 --- a/src/tests/test_stress2.cc +++ b/src/tests/test_stress2.cc @@ -92,7 +92,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op_no_check; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress3.cc b/src/tests/test_stress3.cc index baf746dcdfd..5453d6e58c6 100644 --- a/src/tests/test_stress3.cc +++ b/src/tests/test_stress3.cc @@ -95,7 +95,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress4.cc b/src/tests/test_stress4.cc index 382765609b2..5783774ccdb 100644 --- a/src/tests/test_stress4.cc +++ b/src/tests/test_stress4.cc @@ -90,7 +90,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); toku_free(update_history_buffer); } diff --git a/src/tests/test_stress5.cc b/src/tests/test_stress5.cc index 074eb59e59d..2bac6ee2dc9 100644 --- a/src/tests/test_stress5.cc +++ b/src/tests/test_stress5.cc @@ -59,7 +59,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) { myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress6.cc b/src/tests/test_stress6.cc index 46cce3bf61b..407f258a2b1 100644 --- a/src/tests/test_stress6.cc +++ b/src/tests/test_stress6.cc @@ -104,7 +104,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op_no_check; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress7.cc b/src/tests/test_stress7.cc index 836c91d2c36..88b57749591 100644 --- a/src/tests/test_stress7.cc +++ b/src/tests/test_stress7.cc @@ -59,7 +59,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) { myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress_hot_indexing.cc b/src/tests/test_stress_hot_indexing.cc index a9781d1799c..5f958fa05a5 100644 --- a/src/tests/test_stress_hot_indexing.cc +++ b/src/tests/test_stress_hot_indexing.cc @@ -255,7 +255,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[0].operation = hi_inserts; myargs[1].operation = hi_create_index; - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int diff --git a/src/tests/test_stress_with_verify.cc b/src/tests/test_stress_with_verify.cc index d391a9feba0..a3148a0a41a 100644 --- a/src/tests/test_stress_with_verify.cc +++ b/src/tests/test_stress_with_verify.cc @@ -60,7 +60,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].lock_type = STRESS_LOCK_SHARED; myargs[i].operation = ptquery_op; } - run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); + run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); } int