gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10618 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r10618 - gnunet/src/transport
Date: Tue, 16 Mar 2010 13:19:22 +0100

Author: grothoff
Date: 2010-03-16 13:19:22 +0100 (Tue, 16 Mar 2010)
New Revision: 10618

Modified:
   gnunet/src/transport/gnunet-service-transport.c
Log:
stats

Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c     2010-03-16 12:10:48 UTC 
(rev 10617)
+++ gnunet/src/transport/gnunet-service-transport.c     2010-03-16 12:19:22 UTC 
(rev 10618)
@@ -1210,6 +1210,10 @@
                      GNUNET_i2s (&mq->neighbour_id));
 #endif
          GNUNET_STATISTICS_update (stats,
+                                   gettext_noop ("# bytes in message queue for 
other peers"),
+                                   -mq->message_buf_size,
+                                   GNUNET_NO);
+         GNUNET_STATISTICS_update (stats,
                                    gettext_noop ("# bytes discarded (no 
destination address available)"),
                                    mq->message_buf_size,
                                    GNUNET_NO);      
@@ -1258,6 +1262,10 @@
              rl->plugin->short_name);
 #endif
   GNUNET_STATISTICS_update (stats,
+                           gettext_noop ("# bytes in message queue for other 
peers"),
+                           -mq->message_buf_size,
+                           GNUNET_NO);
+  GNUNET_STATISTICS_update (stats,
                            gettext_noop ("# bytes transmitted to other peers"),
                            mq->message_buf_size,
                            GNUNET_NO);
@@ -1308,7 +1316,7 @@
           if (mq->client == client)
             {
               /* client transmitted to same peer twice
-                 before getting SendOk! */
+                 before getting SEND_OK! */
               GNUNET_break (0);
               return;
             }
@@ -1316,6 +1324,10 @@
         }
     }
 #endif
+  GNUNET_STATISTICS_update (stats,
+                           gettext_noop ("# bytes in message queue for other 
peers"),
+                           message_buf_size,
+                           GNUNET_NO);
   mq = GNUNET_malloc (sizeof (struct MessageQueue) + message_buf_size);
   mq->specific_address = peer_address;
   mq->client = client;
@@ -2699,6 +2711,14 @@
   /* free all messages on the queue */
   while (NULL != (mq = n->messages_head))
     {
+      GNUNET_STATISTICS_update (stats,
+                               gettext_noop ("# bytes in message queue for 
other peers"),
+                               -mq->message_buf_size,
+                               GNUNET_NO);
+      GNUNET_STATISTICS_update (stats,
+                               gettext_noop ("# bytes discarded due to 
disconnect"),
+                               mq->message_buf_size,
+                               GNUNET_NO);
       GNUNET_CONTAINER_DLL_remove (n->messages_head,
                                   n->messages_tail,
                                   mq);





reply via email to

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