This commit allows user to override user-agent with -H option. We
also enabled custom header support for http/1.1 requests. We also did
minor optimizations (std::vector::reserve).
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.
Compile with BoringSSL except for neverbleed and libnghttp2_asio. The
former uses ENGINE and RSA_METHOD, and they are quite different
between OpenSSL and BoringSSL. The latter uses boost::asio, which
calls OpenSSL functions deleted in BoringSSL.