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...

This commit is contained in:
Jacob Leverich 2013-03-13 15:40:00 -07:00
parent 0b3abadab1
commit 08b2e81c86

View File

@ -256,15 +256,16 @@ void Connection::drive_write_machine(double now) {
issue_something(now); issue_something(now);
stats.log_op(op_queue.size()); 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) { while (next_time < now) {
stats.skips++; stats.skips++;
next_time += iagen->generate(); next_time += iagen->generate();
} }
} else {
next_time += iagen->generate();
} }
break; break;