gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4117 - GNUnet/src/applications/dht/module


From: grothoff
Subject: [GNUnet-SVN] r4117 - GNUnet/src/applications/dht/module
Date: Fri, 29 Dec 2006 21:27:56 -0800 (PST)

Author: grothoff
Date: 2006-12-29 21:27:53 -0800 (Fri, 29 Dec 2006)
New Revision: 4117

Modified:
   GNUnet/src/applications/dht/module/routing.c
Log:
more stats

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2006-12-30 05:18:07 UTC 
(rev 4116)
+++ GNUnet/src/applications/dht/module/routing.c        2006-12-30 05:27:53 UTC 
(rev 4117)
@@ -191,6 +191,10 @@
 
 static unsigned int stat_requests_routed;
 
+static unsigned int stat_get_requests_received;
+
+static unsigned int stat_put_requests_received;
+
 /**
  * Given a result, lookup in the routing table
  * where to send it next.
@@ -356,6 +360,8 @@
     GE_BREAK(NULL, 0);
     return SYSERR;
   }
+  if (stats != NULL)
+    stats->change(stat_get_requests_received, 1);
   get = (const DHT_GET_MESSAGE*) msg;
   total = dht_store_get(&get->key,
                        ntohl(get->type),
@@ -420,6 +426,8 @@
     GE_BREAK(NULL, 0);
     return SYSERR;
   }
+  if (stats != NULL)
+    stats->change(stat_put_requests_received, 1);
   put = (const DHT_PUT_MESSAGE*) msg;
   store = 0;
   for (i=0;i<PUT_TRIES;i++) {
@@ -585,6 +593,8 @@
   if (stats != NULL) {
     stat_replies_routed = stats->create(gettext_noop("# dht replies routed"));
     stat_requests_routed = stats->create(gettext_noop("# dht requests 
routed"));
+    stat_get_requests_received = stats->create(gettext_noop("# dht get 
requests received"));
+    stat_put_requests_received = stats->create(gettext_noop("# dht put 
requests received"));
   }
   GE_LOG(coreAPI->ectx,
         GE_DEBUG | GE_REQUEST | GE_USER,





reply via email to

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