gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: also count messages dropped


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: also count messages dropped due to slow clients as allowable losses in unreliable mode
Date: Fri, 27 Jan 2017 22:27:35 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 58beb5ec4 also count messages dropped due to slow clients as allowable 
losses in unreliable mode
58beb5ec4 is described below

commit 58beb5ec4ca0dae1e9adc8617c9d69e5b558b9cc
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 27 22:27:31 2017 +0100

    also count messages dropped due to slow clients as allowable losses in 
unreliable mode
---
 src/cadet/gnunet-service-cadet-new_channel.c | 7 +++++++
 src/cadet/test_cadet.c                       | 7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/cadet/gnunet-service-cadet-new_channel.c 
b/src/cadet/gnunet-service-cadet-new_channel.c
index ebc566c83..8633e7f74 100644
--- a/src/cadet/gnunet-service-cadet-new_channel.c
+++ b/src/cadet/gnunet-service-cadet-new_channel.c
@@ -1242,6 +1242,13 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel 
*ch,
 
       /* Yep, need to drop. Drop the oldest message in
          the buffer. */
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Queue full due slow client on %s, dropping oldest message\n",
+           GCCH_2s (ch));
+      GNUNET_STATISTICS_update (stats,
+                                "# messages dropped due to slow client",
+                                1,
+                                GNUNET_NO);
       drop = ccc->head_recv;
       GNUNET_CONTAINER_DLL_remove (ccc->head_recv,
                                    ccc->tail_recv,
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 79d9423fd..9957d9021 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -395,7 +395,8 @@ stats_iterator (void *cls,
 {
   static const char *s_sent = "# keepalives sent";
   static const char *s_recv = "# keepalives received";
-  static const char *drops = "# messages dropped due to full buffer";
+  static const char *rdrops = "# messages dropped due to full buffer";
+  static const char *cdrops = "# messages dropped due to slow client";
   uint32_t i;
 
   i = GNUNET_TESTBED_get_index (peer);
@@ -409,7 +410,9 @@ stats_iterator (void *cls,
     ka_sent = value;
   if (0 == strncmp(s_recv, name, strlen (s_recv)) && peers_requested - 1 == i)
     ka_received = value;
-  if (0 == strncmp(drops, name, strlen (drops)))
+  if (0 == strncmp(rdrops, name, strlen (rdrops)))
+    msg_dropped += value;
+  if (0 == strncmp(cdrops, name, strlen (cdrops)))
     msg_dropped += value;
 
   return GNUNET_OK;

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



reply via email to

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