Add -M (measure-mode), where master client only opens 1 connection per thread (to avoid client-side queuing delay).

This commit is contained in:
Jacob Leverich 2013-03-06 21:55:24 -08:00
parent 571dc0bd07
commit 960b30dc7b
2 changed files with 5 additions and 5 deletions

View File

@ -34,9 +34,6 @@ option "password" P "Password to use for SASL authentication." string
option "threads" T "Number of threads to spawn." int default="1"
option "connections" c "Connections to establish per server." int default="1"
option "depth" d "Maximum depth to pipeline requests." int default="1"
#option "sasl" - "Perform a binary SASL authentication (plaintext) before \
#issuing any requests. String format is user:pass (Note: this does NOT
#automatically set --binary)" string
option "roundrobin" R "Assign threads to servers in round-robin fashion. \
By default, each thread connects to every server."
@ -63,6 +60,7 @@ text "\nAgent-mode options:"
option "agentmode" A "Run client in agent mode."
option "agent" a "Enlist remote agent." string typestr="host" multiple
option "lambda_mul" l "Lambda multiplier. Increases share of QPS for this client." int default="1"
option "measure_mode" M "Master client ignores --connections, only uses 1 connection per thread."
text "
Some options take a 'distribution' as an argument.

View File

@ -163,7 +163,7 @@ void agent() {
}
void prep_agent(const vector<string>& servers, options_t& options) {
int sum = options.lambda_denom;
int sum = args.measure_mode_given ? options.server_given * options.threads : options.lambda_denom;
for (auto s: agent_sockets) {
zmq::message_t message(sizeof(options_t));
@ -627,7 +627,9 @@ void do_mutilate(const vector<string>& servers, options_t& options,
delete[] s_copy;
for (int c = 0; c < options.connections; c++) {
int conns = args.measure_mode_given ? 1 : options.connections;
for (int c = 0; c < conns; c++) {
Connection* conn = new Connection(base, evdns, hostname, port, options,
args.agentmode_given ? false :
true);