diff options
author | jsing <> | 2023-04-11 05:53:53 +0000 |
---|---|---|
committer | jsing <> | 2023-04-11 05:53:53 +0000 |
commit | ed39abf2dcf0e5422ecdb755974b914bf9225ed6 (patch) | |
tree | d374e844fe5058da007a14c8061dce4828e2baca /src | |
parent | b62f44a9758e7dcf86ce77ec568ea6f2a203aaf9 (diff) | |
download | openbsd-ed39abf2dcf0e5422ecdb755974b914bf9225ed6.tar.gz openbsd-ed39abf2dcf0e5422ecdb755974b914bf9225ed6.tar.bz2 openbsd-ed39abf2dcf0e5422ecdb755974b914bf9225ed6.zip |
Correct benchmark result computation on 32 bit platforms.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/bn/bn_general.c | 4 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/bn/bn_mul_div.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_general.c b/src/regress/lib/libcrypto/bn/bn_general.c index 94f7af19ef..622cbaf105 100644 --- a/src/regress/lib/libcrypto/bn/bn_general.c +++ b/src/regress/lib/libcrypto/bn/bn_general.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_general.c,v 1.1 2023/04/10 19:02:30 jsing Exp $ */ | 1 | /* $OpenBSD: bn_general.c,v 1.2 2023/04/11 05:53:53 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022, 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022, 2023 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -148,7 +148,7 @@ benchmark_run(const struct benchmark *bm, int seconds) | |||
148 | timespecsub(&end, &start, &duration); | 148 | timespecsub(&end, &start, &duration); |
149 | fprintf(stderr, "%d iterations in %f seconds - %llu op/s\n", i, | 149 | fprintf(stderr, "%d iterations in %f seconds - %llu op/s\n", i, |
150 | duration.tv_sec + duration.tv_nsec / 1000000000.0, | 150 | duration.tv_sec + duration.tv_nsec / 1000000000.0, |
151 | (size_t)i * 1000000000 / | 151 | (uint64_t)i * 1000000000 / |
152 | (duration.tv_sec * 1000000000 + duration.tv_nsec)); | 152 | (duration.tv_sec * 1000000000 + duration.tv_nsec)); |
153 | 153 | ||
154 | BN_free(src); | 154 | BN_free(src); |
diff --git a/src/regress/lib/libcrypto/bn/bn_mul_div.c b/src/regress/lib/libcrypto/bn/bn_mul_div.c index 278f8d715b..810c7cde19 100644 --- a/src/regress/lib/libcrypto/bn/bn_mul_div.c +++ b/src/regress/lib/libcrypto/bn/bn_mul_div.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mul_div.c,v 1.5 2023/01/29 15:51:26 jsing Exp $ */ | 1 | /* $OpenBSD: bn_mul_div.c,v 1.6 2023/04/11 05:53:53 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -386,7 +386,7 @@ benchmark_run(const struct benchmark *bm, int seconds) | |||
386 | timespecsub(&end, &start, &duration); | 386 | timespecsub(&end, &start, &duration); |
387 | fprintf(stderr, "%d iterations in %f seconds - %llu op/s\n", i, | 387 | fprintf(stderr, "%d iterations in %f seconds - %llu op/s\n", i, |
388 | duration.tv_sec + duration.tv_nsec / 1000000000.0, | 388 | duration.tv_sec + duration.tv_nsec / 1000000000.0, |
389 | (size_t)i * 1000000000 / | 389 | (uint64_t)i * 1000000000 / |
390 | (duration.tv_sec * 1000000000 + duration.tv_nsec)); | 390 | (duration.tv_sec * 1000000000 + duration.tv_nsec)); |
391 | 391 | ||
392 | BN_CTX_end(bn_ctx); | 392 | BN_CTX_end(bn_ctx); |