gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] 02/02: print CPU time for benchmark descen


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 02/02: print CPU time for benchmark descendant processes
Date: Tue, 02 Oct 2018 17:28:21 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

commit b7bbc4cc701e0a38415f68fb962dd5bd79dcc87b
Author: Florian Dold <address@hidden>
AuthorDate: Tue Oct 2 17:26:42 2018 +0200

    print CPU time for benchmark descendant processes
---
 src/benchmark/taler-exchange-benchmark.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/benchmark/taler-exchange-benchmark.c 
b/src/benchmark/taler-exchange-benchmark.c
index 7b63b987..031b68a3 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -28,6 +28,7 @@
 #include "platform.h"
 #include <gnunet/gnunet_util_lib.h>
 #include <microhttpd.h>
+#include <sys/resource.h>
 #include "taler_util.h"
 #include "taler_signatures.h"
 #include "taler_exchange_service.h"
@@ -999,6 +1000,8 @@ main (int argc,
   duration = GNUNET_TIME_absolute_get_duration (start_time);
   if (GNUNET_OK == result)
   {
+    struct rusage usage;
+    GNUNET_assert (0 == getrusage(RUSAGE_CHILDREN, &usage));
     fprintf (stdout,
              "Executed (Withdraw=%u, Deposit=%u, Refresh~=%5.2f) * Reserve=%u 
* Parallel=%u, operations in %s\n",
              howmany_coins,
@@ -1023,6 +1026,9 @@ main (int argc,
              howmany_reserves,
              howmany_clients,
              (unsigned long long) duration.rel_value_us);
+    fprintf (stdout, "cpu time: sys %llu user %llu\n", \
+             (unsigned long long) (usage.ru_stime.tv_sec * 1000 * 1000 + 
usage.ru_stime.tv_usec),
+             (unsigned long long) (usage.ru_utime.tv_sec * 1000 * 1000 + 
usage.ru_utime.tv_usec));
   }
   return (GNUNET_OK == result) ? 0 : result;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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