NULL
};
+static int threadcount;
+
void do_pemread(size_t num)
{
EVP_PKEY *key;
* Technically this includes the EVP_PKEY_free() in the timing - but I
* think we can live with that
*/
- for (i = 0; i < NUM_CALLS_PER_THREAD; i++) {
+ for (i = 0; i < NUM_CALLS_PER_THREAD / threadcount; i++) {
key = PEM_read_bio_PrivateKey(pem, NULL, NULL, NULL);
if (key == NULL) {
printf("Failed to create key: %d\n", i);
int main(int argc, char *argv[])
{
- int threadcount;
OSSL_TIME duration;
uint64_t us;
double avcalltime;
us = ossl_time2us(duration);
- avcalltime = (double)us / (NUM_CALL_BLOCKS_PER_THREAD * threadcount);
+ avcalltime = (double)us / NUM_CALL_BLOCKS_PER_THREAD;
if (terse)
printf("%lf\n", avcalltime);