diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-04 10:48:11 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-04 10:48:11 +0200 |
commit | b422230d1b846155b64a9e8cdcf8ed2563f442cc (patch) | |
tree | 5398f3245c98c77533c87ec170ba24f655c3470e | |
parent | 4ef54a780d581dabafcca1b42e3d413ead491184 (diff) | |
download | gnutls-b422230d1b846155b64a9e8cdcf8ed2563f442cc.tar.gz |
Use double to count bytes.
-rw-r--r-- | src/benchmark.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/benchmark.c b/src/benchmark.c index 6c8fd6eecc..73aba25e05 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -46,7 +46,7 @@ tls_log_func (int level, const char *str) fprintf (stderr, "|<%d>| %s", level, str); } -static void value2human(int bytes, double time, double* data, double* speed,char* metric) +static void value2human(double bytes, double time, double* data, double* speed,char* metric) { if (bytes > 1000 && bytes < 1000*1000) { *data = ((double)bytes)/1000; @@ -80,7 +80,7 @@ cipher_bench (int algo, int size) gnutls_datum_t key, iv; struct timespec start, stop; double secs; - long data_size = 0; + double data_size = 0; double dspeed, ddata; int blocksize = gnutls_cipher_get_block_size (algo); int keysize = gnutls_cipher_get_key_size (algo); @@ -149,7 +149,7 @@ mac_bench (int algo, int size) void *_key; struct timespec start, stop; double secs; - long data_size = 0; + double data_size = 0; double ddata, dspeed; int blocksize = gnutls_hmac_get_len (algo); char metric[16]; |