From 0b3abadab1b0259bd7e945e35d26fd5cf70ccdac Mon Sep 17 00:00:00 2001 From: Jacob Leverich Date: Tue, 12 Mar 2013 15:33:44 -0700 Subject: [PATCH] --skip: pass option with options_t to agents --- Connection.cc | 2 +- ConnectionOptions.h | 1 + mutilate.cc | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Connection.cc b/Connection.cc index b2b71f3..97cae9c 100644 --- a/Connection.cc +++ b/Connection.cc @@ -256,7 +256,7 @@ void Connection::drive_write_machine(double now) { issue_something(now); stats.log_op(op_queue.size()); - if (args.skip_given && op_queue.size() >= (size_t) options.depth) { + if (options.skip && op_queue.size() >= (size_t) options.depth) { next_time += iagen->generate(); while (next_time < now) { diff --git a/ConnectionOptions.h b/ConnectionOptions.h index 2315fb1..5851b4e 100644 --- a/ConnectionOptions.h +++ b/ConnectionOptions.h @@ -33,6 +33,7 @@ typedef struct { int threads; enum distribution_t iadist; int warmup; + bool skip; bool roundrobin; int server_given; diff --git a/mutilate.cc b/mutilate.cc index fc76c0a..a8a3e03 100644 --- a/mutilate.cc +++ b/mutilate.cc @@ -1017,6 +1017,7 @@ void args_to_options(options_t* options) { strcpy(options->ia, args.iadist_arg); options->warmup = args.warmup_given ? args.warmup_arg : 0; options->oob_thread = false; + options->skip = args.skip_given; } void init_random_stuff() {