gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-144-g1f71576


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-144-g1f71576
Date: Thu, 18 Feb 2010 09:27:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=1f71576c44bdbabd6c2783fc31d8fc4bfda816ad

The branch, master has been updated
       via  1f71576c44bdbabd6c2783fc31d8fc4bfda816ad (commit)
      from  f5ad38187df68e3f44faed98abedeac689244b50 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1f71576c44bdbabd6c2783fc31d8fc4bfda816ad
Author: Simon Josefsson <address@hidden>
Date:   Thu Feb 18 10:25:23 2010 +0100

    Use gnulib gettime module.  Indent.

-----------------------------------------------------------------------

Summary of changes:
 src/benchmark.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/benchmark.c b/src/benchmark.c
index b54a866..0fe47dc 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -28,6 +28,7 @@
 #include <gnutls/gnutls.h>
 #include <gnutls/crypto.h>
 #include <time.h>
+#include "timespec.h" /* gnulib gettime */
 
 static unsigned char data[64 * 1024];
 
@@ -68,7 +69,7 @@ cipher_bench (int algo, int size)
   printf ("Checking %s (%dkb payload)... ", gnutls_cipher_get_name (algo),
          size);
   fflush (stdout);
-  clock_gettime (CLOCK_MONOTONIC, &start);
+  gettime (&start);
 
   ret = gnutls_cipher_init (&ctx, algo, &key, &iv);
   if (ret < 0)
@@ -85,11 +86,10 @@ cipher_bench (int algo, int size)
 
   gnutls_cipher_deinit (ctx);
 
-  clock_gettime (CLOCK_MONOTONIC, &stop);
+  gettime (&stop);
 
-  secs =
-    (stop.tv_sec * 1000 + stop.tv_nsec / (1000 * 1000) -
-     (start.tv_sec * 1000 + start.tv_nsec / (1000 * 1000)));
+  secs = (stop.tv_sec * 1000 + stop.tv_nsec / (1000 * 1000) -
+         (start.tv_sec * 1000 + start.tv_nsec / (1000 * 1000)));
   secs /= 1000;
   dd = (((double) data_size / (double) secs)) / 1000;
   printf ("Encrypted %ld kb in %.2f secs: ", data_size / 1000, secs);
@@ -121,7 +121,7 @@ mac_bench (int algo, int size)
 
   printf ("Checking %s (%dkb payload)... ", gnutls_mac_get_name (algo), size);
   fflush (stdout);
-  clock_gettime (CLOCK_MONOTONIC, &start);
+  gettime (&start);
 
   for (i = 0; i < TOTAL_ITER; i++)
     {
@@ -129,7 +129,7 @@ mac_bench (int algo, int size)
       data_size += size * 1024;
     }
 
-  clock_gettime (CLOCK_MONOTONIC, &stop);
+  gettime (&stop);
 
   secs =
     (stop.tv_sec * 1000 + stop.tv_nsec / (1000 * 1000) -
@@ -140,7 +140,6 @@ mac_bench (int algo, int size)
   printf ("%.2f kbyte/sec\n", dd);
 
   free (_key);
-
 }
 
 int


hooks/post-receive
-- 
GNU gnutls




reply via email to

[Prev in Thread] Current Thread [Next in Thread]