NPN has been superseeded by ALPN. OpenSSL provides a configure
option to disable npn (no-npn) which results in an OpenSSL
installation that defines OPENSSL_NO_NEXTPROTONEG in opensslconf.h
The #ifdef's look safe here (as the next_proto is initialized as
nullptr). Alteratively, macros could be defined for the used npn
methods that return a 0 for next_proto.
Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
* Adding timing-sensitive load test option in h2load.
* more checks added for parameters
* A worker thread can control its clients' warmup and main duration.
* Changed warmup to an enum variable.
* removed unnecessary call to ev_timer_stop
* assertion is done before starting main measurement phase
* phase variable is implemented only inside the Worker class
* enum to enum class
* else indentation corrected
* check added for timing-based test when duration CB is called explicitly
* New argument is introduced for timing-based benchmarking.
* styling corrections
* duration watcher initialization is pushed back into warmup timeout
* Warmup and Duration timer is moved to Worker instead of clients. Now both timers and phase belongs to the Workers.
* some client functions are modified to return if it's not main_duration phase. client is not destructed but sessions are terminated
* outputs are adjusted for thread.
* Needed to check if a session exist before terminating
* formatting
* more formatting
* formatting
If OpenSSL supports TLSv1.3, enable it by default for all applications
under src. BoringSSL can work at the moment although it does not
unlock all the features nghttpx offers. OpenSSL's TLSv1.3 support is
still WIP at the time of writing.
boringssl says:
/* It is an error to clear any bits that have already been set. (We can't try
* to get a second close_notify or send two.) */
assert((SSL_get_shutdown(ssl) & mode) == SSL_get_shutdown(ssl));
h2load has supported uploading a file quite a while, but it turns out
that it worked with HTTP/2 and SPDY only. HTTP/1 with upload did not
work. This commit fixes this bug, and implement HTTP/1 upload. Due
to architectural limitation of h2load, when -d option is used, the
number of in-flight pipe-lined requests is set to 1.
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.