diff --git a/cmdline.ggo b/cmdline.ggo index eb5f9e1..f6cbad7 100644 --- a/cmdline.ggo +++ b/cmdline.ggo @@ -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. diff --git a/mutilate.cc b/mutilate.cc index 03700d3..59011e6 100644 --- a/mutilate.cc +++ b/mutilate.cc @@ -163,7 +163,7 @@ void agent() { } void prep_agent(const vector& 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& 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);