Skip to content

Commit 9bca873

Browse files
andrewkdinhnhorman
authored andcommitted
fixup! Set a constant amount of runtime on more perf tests
Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from #33)
1 parent 7388d62 commit 9bca873

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

source/evp_fetch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ void do_fetch(size_t num)
281281
}
282282
counts[num]++;
283283
time = ossl_time_now();
284-
}
285-
while (time.t < max_time.t);
284+
} while (time.t < max_time.t);
286285
}
287286

288287
int main(int argc, char *argv[])
@@ -292,6 +291,7 @@ int main(int argc, char *argv[])
292291
double av;
293292
int terse = 0;
294293
size_t i;
294+
int j;
295295
int rc = EXIT_FAILURE;
296296
char *fetch_type = getenv("EVP_FETCH_TYPE");
297297
int opt;
@@ -377,8 +377,8 @@ int main(int argc, char *argv[])
377377
goto out;
378378
}
379379

380-
for (i = 0; i < threadcount; i++)
381-
total_count += counts[i];
380+
for (j = 0; j < threadcount; j++)
381+
total_count += counts[j];
382382

383383
/*
384384
* EVP_fetch_* calls are pretty fast, running in

source/evp_setpeer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ static void usage(char * const argv[])
130130
int main(int argc, char *argv[])
131131
{
132132
OSSL_TIME duration;
133-
size_t total_count = 0;
134-
double avcalltime;
135133
int terse = 0;
136134
int rc = EXIT_FAILURE;
137135
size_t i;

source/pkeyread.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ static void do_pemread(size_t num)
4545
EVP_PKEY *key;
4646
BIO *pem;
4747
size_t i;
48-
size_t len;
4948
OSSL_TIME time;
5049

5150
if (sample_id >= SAMPLE_ALL) {
@@ -93,8 +92,6 @@ static void do_pemread(size_t num)
9392

9493
static int sample_id_to_evp(int sample_id)
9594
{
96-
int rv;
97-
9895
if ((sample_id < 0) || (sample_id >= SAMPLE_ALL))
9996
return EVP_PKEY_NONE;
10097

@@ -105,10 +102,7 @@ static void do_derread(size_t num)
105102
{
106103
const unsigned char *keydata;
107104
size_t keydata_sz;
108-
const unsigned char *pk_buf = NULL;
109-
int pk_buf_len;
110105
EVP_PKEY *pkey = NULL;
111-
int i;
112106
OSSL_TIME time;
113107

114108
if (sample_id >= SAMPLE_ALL) {

source/providerdoall.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ static int threadcount;
4242

4343
static void do_providerdoall(size_t num)
4444
{
45-
size_t i;
4645
int count;
4746
OSSL_TIME time;
4847

source/randbytes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ int main(int argc, char *argv[])
111111
rc = EXIT_SUCCESS;
112112
out:
113113
OPENSSL_free(counts);
114-
return EXIT_SUCCESS;
114+
return rc;
115115
}

0 commit comments

Comments
 (0)