Commit 4030060d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

h2load: Simplify rate mode

This change simplifies rate mode as proposed idea as plan B in GH-382.

In this change, we removed -C option.  Instead, -c option is used to
specify the number of connections to be made, and it is now required
argument if more than 1 clients are required (this is usually the
case).  The number of requests made per connection is calculated
simply by -n / -c.

-n option is handled specially when --timing-script-file is used.  If
-n is used with --timing-script, it specifies the number of requests
-each client will make rather than the total number of requests h2load
-will perform across clients.  This handling applies to rate mode too.

We also clarified the sematics about distribution of rate among the
threads.
parent 509c5155
This diff is collapsed.
......@@ -82,8 +82,6 @@ struct Config {
// rate at which connections should be made
size_t rate;
ev_tstamp rate_period;
// number of connections made
size_t nconns;
// amount of time to wait for activity on a given connection
ssize_t conn_active_timeout;
// amount of time to wait after the last request is made on a connection
......@@ -200,7 +198,12 @@ struct Worker {
bool tls_info_report_done;
bool app_info_report_done;
size_t nconns_made;
// number of clients this worker handles
size_t nclients;
// number of requests each client issues
size_t nreqs_per_client;
// at most nreqs_rem clients get an extra request
size_t nreqs_rem;
size_t rate;
ev_timer timeout_watcher;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment