From 08b2e81c860461c00e0e99397d75bb1918a7c3a8 Mon Sep 17 00:00:00 2001 From: Jacob Leverich Date: Wed, 13 Mar 2013 15:40:00 -0700 Subject: [PATCH] Change --skip behavior to only jump ahead if the tx time is at least 5ms (hardcoded for now) behind. Always pacing with timer events was causing it to severely miss QPS targets... --- Connection.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Connection.cc b/Connection.cc index 97cae9c..584fa9c 100644 --- a/Connection.cc +++ b/Connection.cc @@ -256,15 +256,16 @@ void Connection::drive_write_machine(double now) { issue_something(now); stats.log_op(op_queue.size()); - if (options.skip && op_queue.size() >= (size_t) options.depth) { - next_time += iagen->generate(); + next_time += iagen->generate(); + + if (options.skip && options.lambda > 0.0 && + now - next_time > 0.005000 && + op_queue.size() >= (size_t) options.depth) { while (next_time < now) { stats.skips++; next_time += iagen->generate(); } - } else { - next_time += iagen->generate(); } break;