gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (29cec003c -> b8e7ad71e)


From: gnunet
Subject: [gnunet] branch master updated (29cec003c -> b8e7ad71e)
Date: Mon, 30 Dec 2019 15:53:18 +0100

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

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from 29cec003c replace printf() with GNUNET_log()
     new e5f111295 minor test runn modification
     new 8e2b774ff fix test
     new b8e7ad71e Merge branch 'master' of ssh://gnunet.org/gnunet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/transport/test_communicator_basic.c | 38 +++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/transport/test_communicator_basic.c 
b/src/transport/test_communicator_basic.c
index eb4ba86b1..e11fb09eb 100644
--- a/src/transport/test_communicator_basic.c
+++ b/src/transport/test_communicator_basic.c
@@ -74,9 +74,7 @@ static struct 
GNUNET_TRANSPORT_TESTING_TransportCommunicatorQueue *my_tc;
 
 #define BURST_PACKETS 5000
 
-#define FIXME_DEAD_BURST_RUNS 1
-
-#define TOTAL_ITERATIONS 20
+#define TOTAL_ITERATIONS 5
 
 static unsigned int iterations_left = TOTAL_ITERATIONS;
 
@@ -322,7 +320,7 @@ update_avg_latency (const char*payload)
   ts_n = (struct GNUNET_TIME_AbsoluteNBO *) payload;
   ts = GNUNET_TIME_absolute_ntoh (*ts_n);
   latency = GNUNET_TIME_absolute_get_duration (ts);
-  if (1 == num_received)
+  if (1 >= num_received)
     avg_latency = latency.rel_value_us;
   else
     avg_latency = ((avg_latency * (num_received - 1)) + latency.rel_value_us)
@@ -367,16 +365,21 @@ incoming_message_cb (void *cls,
       {
         GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
                     "Short size packet test done.\n");
+        char *goodput = GNUNET_STRINGS_byte_size_fancy ((SHORT_MESSAGE_SIZE
+                                                         * num_received)
+                                                        / (GNUNET_MAX (1,
+                                                                       
duration.
+                                                                       
rel_value_us
+                                                                       / (1000
+                                                                          * 
1000))));
         GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
-                    "%lu/%lu packets in %llu us (%llu kb/s) -- avg latency: 
%llu us\n",
+                    "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu 
us\n",
                     (unsigned long) num_received,
                     (unsigned long) num_sent,
                     (unsigned long long) duration.rel_value_us,
-                    (unsigned long long) ((SHORT_MESSAGE_SIZE * num_received)
-                                          / (duration.rel_value_us
-                                             /
-                                             1000)),
+                    goodput,
                     (unsigned long long) avg_latency);
+        GNUNET_free (goodput);
         start_long = GNUNET_TIME_absolute_get ();
         phase = TP_BURST_LONG;
         num_sent = 0;
@@ -402,16 +405,22 @@ incoming_message_cb (void *cls,
       {
         GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
                     "Long size packet test done.\n");
+        char *goodput = GNUNET_STRINGS_byte_size_fancy ((LONG_MESSAGE_SIZE
+                                                         * num_received)
+                                                        / (GNUNET_MAX (1,
+                                                                       
duration.
+                                                                       
rel_value_us
+                                                                       / (1000
+                                                                          * 
1000))));
+
         GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
-                    "%lu/%lu packets in %llu us (%llu kb/s) -- avg latency: 
%llu us\n",
+                    "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu 
us\n",
                     (unsigned long) num_received,
                     (unsigned long) num_sent,
                     (unsigned long long) duration.rel_value_us,
-                    (unsigned long long) ((LONG_MESSAGE_SIZE * num_received)
-                                          / (duration.rel_value_us
-                                             /
-                                             1000)),
+                    goodput,
                     (unsigned long long) avg_latency);
+        GNUNET_free (goodput);
         ack = 10;
         phase = TP_SIZE_CHECK;
         num_received = 0;
@@ -441,6 +450,7 @@ incoming_message_cb (void *cls,
         iterations_left--;
         if (0 != iterations_left)
         {
+          start_short = GNUNET_TIME_absolute_get ();
           phase = TP_BURST_SHORT;
           active_task = GNUNET_SCHEDULER_add_now (&short_test,
                                                   NULL);

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



reply via email to

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