Add support for async jobs in OpenSSL speed
authorAndrea Grandi <andrea.grandi@intel.com>
Wed, 9 Dec 2015 07:26:38 +0000 (07:26 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 7 Mar 2016 16:27:24 +0000 (16:27 +0000)
commit8b0b80d923d3dfcf982caf27b17bd14d3fa9ff01
tree6d20edd2661d7fe5f0a2b2a5f913ed64b9091ac1
parenta556f342201473b4bf8dbf879b03890a74e412b6
Add support for async jobs in OpenSSL speed

Summary of the changes:

* Move the calls to the crypto operations inside wrapper functions.
  This is required because ASYNC_start_job takes a function as an argument.

* Add new function run_benchmark() that manages the jobs for all the operations.
  In the POSIX case it uses a select() to receive the events from the engine
  and resume the jobs that are paused, while in the WIN case it uses PeekNamedPipe()

* Add new option argument async_jobs to enable and specify the number of async jobs

Example:
  openssl speed -engine dasync -elapsed -async_jobs 32 rsa2048

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
apps/speed.c