aboutsummaryrefslogtreecommitdiff
path: root/src/util/perf_crypto_hash.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:46:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:46:35 +0000
commit502af2167f7c218366666ca4944bd7cc54b5b19a (patch)
treea91fec5cc9769d260640bd91c6633cb9cf395524 /src/util/perf_crypto_hash.c
parent03af5a603b7cc53432249d5854cd412aa90dde0d (diff)
downloadgnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.tar.gz
gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.zip
indentation
Diffstat (limited to 'src/util/perf_crypto_hash.c')
-rw-r--r--src/util/perf_crypto_hash.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/util/perf_crypto_hash.c b/src/util/perf_crypto_hash.c
index 0b4067b15..d883776b4 100644
--- a/src/util/perf_crypto_hash.c
+++ b/src/util/perf_crypto_hash.c
@@ -42,11 +42,11 @@ perfHash ()
42 memset (buf, 1, 1024 * 64); 42 memset (buf, 1, 1024 * 64);
43 GNUNET_CRYPTO_hash ("foo", 3, &hc1); 43 GNUNET_CRYPTO_hash ("foo", 3, &hc1);
44 for (i = 0; i < 1024; i++) 44 for (i = 0; i < 1024; i++)
45 { 45 {
46 GNUNET_CRYPTO_hash (&hc1, sizeof (GNUNET_HashCode), &hc2); 46 GNUNET_CRYPTO_hash (&hc1, sizeof (GNUNET_HashCode), &hc2);
47 GNUNET_CRYPTO_hash (&hc2, sizeof (GNUNET_HashCode), &hc1); 47 GNUNET_CRYPTO_hash (&hc2, sizeof (GNUNET_HashCode), &hc1);
48 GNUNET_CRYPTO_hash (buf, 1024 * 64, &hc3); 48 GNUNET_CRYPTO_hash (buf, 1024 * 64, &hc3);
49 } 49 }
50 GNUNET_free (buf); 50 GNUNET_free (buf);
51} 51}
52 52
@@ -60,7 +60,10 @@ main (int argc, char *argv[])
60 printf ("Hash perf took %llu ms\n", 60 printf ("Hash perf took %llu ms\n",
61 (unsigned long long) 61 (unsigned long long)
62 GNUNET_TIME_absolute_get_duration (start).rel_value); 62 GNUNET_TIME_absolute_get_duration (start).rel_value);
63 GAUGER ("UTIL", "Cryptographic hashing", 1024 * 64 * 1024 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value), "kb/s"); 63 GAUGER ("UTIL", "Cryptographic hashing",
64 1024 * 64 * 1024 / (1 +
65 GNUNET_TIME_absolute_get_duration
66 (start).rel_value), "kb/s");
64 return 0; 67 return 0;
65} 68}
66 69