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) {
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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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.
//
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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