[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26078 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26078 - gnunet/src/util |
Date: |
Tue, 12 Feb 2013 16:39:33 +0100 |
Author: grothoff
Date: 2013-02-12 16:39:33 +0100 (Tue, 12 Feb 2013)
New Revision: 26078
Modified:
gnunet/src/util/test_crypto_ecc.c
Log:
-key gen perf
Modified: gnunet/src/util/test_crypto_ecc.c
===================================================================
--- gnunet/src/util/test_crypto_ecc.c 2013-02-12 15:01:21 UTC (rev 26077)
+++ gnunet/src/util/test_crypto_ecc.c 2013-02-12 15:39:33 UTC (rev 26078)
@@ -201,7 +201,28 @@
sizeof (struct GNUNET_HashCode)));
}
+static void
+perf_keygen ()
+{
+ struct GNUNET_TIME_Absolute start;
+ struct GNUNET_CRYPTO_EccPrivateKey *pk;
+ int i;
+ start = GNUNET_TIME_absolute_get ();
+ for (i=0;i<10;i++)
+ {
+ fprintf (stderr, ".");
+ pk = GNUNET_CRYPTO_ecc_key_create ();
+ GNUNET_CRYPTO_ecc_key_free (pk);
+ }
+ fprintf (stderr, "\n");
+ printf ("Creating 10 ECC keys took %llu ms\n",
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
+}
+
+
+
int
main (int argc, char *argv[])
{
@@ -228,6 +249,7 @@
GNUNET_CRYPTO_ecc_key_free (key);
GNUNET_assert (0 == UNLINK (KEYFILE));
test_ecdh ();
+ perf_keygen ();
if (failureCount != 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26078 - gnunet/src/util,
gnunet <=