This change adds subsecond rate period support to h2load. Now
--rate-period option only accepts integer, but it can be followed by
units. Currently, h, m, s, and ms are supported, which are hours,
minutes, seconds, and milliseconds respectively. The underlying
functionality and usecase are already extensively used in nghttpx.
When thread is created, we pause them. After all threads are created,
master thread sends signal to all worker threads and let them start to
benchmark. This will make thread start almost at the same time since
we can avoid thread creation overhead. It also exclude thread
creating time from benchmark time. We also simplified thread creation
routine, and now we always use dedicted worker thread to issue
requests even if -t1.
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.
This commit changes nghttpx's mruby script handling. Previously we
have 2 options to specify the mruby script file to be run on request
and on response. Now they are merged into 1 option, namely
--mruby-file. It now must return object. On request, the object's
on_req(env) method is invoked with env object. Similarly, on
response, the object's on_resp(env) method is invoked. The
specification of Env object has not changed.