gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r10617 - gnunet/src/transport
Date: Tue, 16 Mar 2010 13:10:48 +0100

Author: grothoff
Date: 2010-03-16 13:10:48 +0100 (Tue, 16 Mar 2010)
New Revision: 10617

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:46 UTC 
(rev 10616)
+++ gnunet/src/transport/gnunet-service-transport.c     2010-03-16 12:10:48 UTC 
(rev 10617)
@@ -919,6 +919,10 @@
       /* fatal error with client, free message queue! */
       while (NULL != (q = client->message_queue_head))
         {
+         GNUNET_STATISTICS_update (stats,
+                                   gettext_noop ("# bytes discarded (could not 
transmit to client)"),
+                                   ntohs (((const struct 
GNUNET_MessageHeader*)&q[1])->size),
+                                   GNUNET_NO);      
          GNUNET_CONTAINER_DLL_remove (client->message_queue_head,
                                       client->message_queue_tail,
                                       q);
@@ -1055,6 +1059,20 @@
   struct MessageQueue *mq = cls;
   struct NeighbourList *n;
 
+  if (result == GNUNET_OK)
+    {
+      GNUNET_STATISTICS_update (stats,
+                               gettext_noop ("# bytes successfully transmitted 
by plugins"),
+                               mq->message_buf_size,
+                               GNUNET_NO);      
+    }
+  else
+    {
+      GNUNET_STATISTICS_update (stats,
+                               gettext_noop ("# bytes with transmission 
failure by plugins"),
+                               mq->message_buf_size,
+                               GNUNET_NO);      
+    }  
   n = find_neighbour(&mq->neighbour_id);
   GNUNET_assert (n != NULL);
   if (mq->specific_address != NULL)
@@ -1191,6 +1209,10 @@
                      mq->message_buf_size,
                      GNUNET_i2s (&mq->neighbour_id));
 #endif
+         GNUNET_STATISTICS_update (stats,
+                                   gettext_noop ("# bytes discarded (no 
destination address available)"),
+                                   mq->message_buf_size,
+                                   GNUNET_NO);      
          if (mq->client != NULL)
            transmit_send_ok (mq->client, neighbour, GNUNET_NO);
          GNUNET_CONTAINER_DLL_remove (neighbour->messages_head,





reply via email to

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