Commit 5905b504 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5671 compile fix

git-svn-id: file:///svn/toku/tokudb@50131 c7de825b-a66e-492c-adef-691d508d4ae1
parent 85992e9c
...@@ -92,7 +92,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -92,7 +92,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
myargs[i].operation = checkpoint_var; myargs[i].operation = checkpoint_var;
myargs[i].operation_extra = &val_size; 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 int
......
...@@ -41,7 +41,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -41,7 +41,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = create_child_txn; 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 int
......
...@@ -35,7 +35,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -35,7 +35,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = cursor_create_close_op; 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 int
......
...@@ -38,7 +38,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -38,7 +38,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
} }
} }
const bool crash_at_end = false; 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 int
......
...@@ -34,7 +34,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -34,7 +34,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
} }
} }
const bool crash_at_end = false; 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 int
......
...@@ -29,7 +29,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -29,7 +29,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = malloc_free_op; 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 int
......
...@@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = nop; 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 int
......
...@@ -55,7 +55,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -55,7 +55,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = ptquery_op; 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 int
......
...@@ -68,7 +68,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -68,7 +68,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
myargs[i].operation = ptquery_op2; myargs[i].operation = ptquery_op2;
myargs[i].operation_extra = &thread_ids[i]; 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 int
......
...@@ -66,7 +66,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -66,7 +66,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
myargs[i].operation = perf_read; 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 int
......
...@@ -51,7 +51,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -51,7 +51,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myarg, dbp, env, cli_args); arg_init(&myarg, dbp, env, cli_args);
myarg.operation = commit_and_create_txn; 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++) { for (int i = 0; i < num_txns; i++) {
int chk_r = txns[i]->commit(txns[i], 0); int chk_r = txns[i]->commit(txns[i], 0);
......
...@@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -27,7 +27,7 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = xmalloc_free_op; 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 int
......
...@@ -68,14 +68,14 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -68,14 +68,14 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
//myargs[0].update_pad_frequency = 0; //myargs[0].update_pad_frequency = 0;
db_env_set_flusher_thread_callback(flt_callback, env); 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 static int
run_recover_flt_test(int argc, char *const argv[]) { run_recover_flt_test(int argc, char *const argv[]) {
struct cli_args args = get_default_args(); struct cli_args args = get_default_args();
// make test time arbitrarily high because we expect a crash // make test time arbitrarily high because we expect a crash
args.time_of_test = 1000000000; args.num_seconds = 1000000000;
args.num_elements = 2000; args.num_elements = 2000;
// we want to induce a checkpoint // we want to induce a checkpoint
args.env_args.checkpointing_period = 0; args.env_args.checkpointing_period = 0;
......
...@@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].do_prepare = true; 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); run_workers(myargs, num_threads, num_seconds, true, cli_args);
} }
......
...@@ -30,7 +30,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -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); run_workers(myargs, num_threads, num_seconds, true, cli_args);
} }
......
...@@ -126,7 +126,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -126,7 +126,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
} }
db_env_set_checkpoint_callback2(checkpoint_callback2, NULL); 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(); start_time = get_tnow();
run_workers(myargs, num_threads, INT32_MAX, true, cli_args); run_workers(myargs, num_threads, INT32_MAX, true, cli_args);
} }
......
...@@ -33,14 +33,14 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { ...@@ -33,14 +33,14 @@ stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) {
arg_init(&myargs[i], dbp, env, cli_args); arg_init(&myargs[i], dbp, env, cli_args);
myargs[i].operation = random_sleep; 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 int
test_main(int UU(argc), char *const UU(argv[])) { test_main(int UU(argc), char *const UU(argv[])) {
struct cli_args args = get_default_args_for_perf(); struct cli_args args = get_default_args_for_perf();
db_env_set_mvcc_garbage_collection_verification(1); db_env_set_mvcc_garbage_collection_verification(1);
args.time_of_test = 60; args.num_seconds = 60;
args.num_ptquery_threads = 12; args.num_ptquery_threads = 12;
stress_test_main(&args); stress_test_main(&args);
return 0; return 0;
......
...@@ -229,7 +229,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -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, // stress_openclose_crash_at_end should be changed to true or false,
// depending if this test is for recovery or not. // depending if this test is for recovery or not.
const bool crash_at_end = stress_openclose_crash_at_end; 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. // the stress test is now complete. get ready for shutdown/close.
// //
......
...@@ -53,7 +53,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -53,7 +53,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].prelock_updates = i < 4 ? true : false; 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 int
......
...@@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -98,7 +98,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].do_prepare = true; 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 int
......
...@@ -92,7 +92,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -92,7 +92,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].operation = ptquery_op_no_check; 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 int
......
...@@ -95,7 +95,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -95,7 +95,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].operation = ptquery_op; 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 int
......
...@@ -90,7 +90,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -90,7 +90,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].operation = ptquery_op; 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); toku_free(update_history_buffer);
} }
......
...@@ -59,7 +59,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -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++) { for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) {
myargs[i].operation = ptquery_op; 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 int
......
...@@ -104,7 +104,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -104,7 +104,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[i].operation = ptquery_op_no_check; 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 int
......
...@@ -59,7 +59,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -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++) { for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) {
myargs[i].operation = ptquery_op; 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 int
......
...@@ -255,7 +255,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -255,7 +255,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs[0].operation = hi_inserts; myargs[0].operation = hi_inserts;
myargs[1].operation = hi_create_index; 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 int
......
...@@ -60,7 +60,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -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].lock_type = STRESS_LOCK_SHARED;
myargs[i].operation = ptquery_op; 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 int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment