gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2532 - GNUnet/src/applications/gap


From: grothoff
Subject: [GNUnet-SVN] r2532 - GNUnet/src/applications/gap
Date: Thu, 16 Mar 2006 22:00:14 -0800 (PST)

Author: grothoff
Date: 2006-03-16 22:00:11 -0800 (Thu, 16 Mar 2006)
New Revision: 2532

Modified:
   GNUnet/src/applications/gap/gap.c
Log:
reorder

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2006-03-17 05:41:08 UTC (rev 2531)
+++ GNUnet/src/applications/gap/gap.c   2006-03-17 06:00:11 UTC (rev 2532)
@@ -93,6 +93,8 @@
 
 static int stat_routing_local_results;
 
+static int stat_routing_processed;
+
 /**
  * Topology service.
  */
@@ -1386,6 +1388,8 @@
       isRouted ? " routing" : "",
       i);
 #endif
+  if (stats != NULL)
+    stats->change(stat_routing_processed, 1);
   cls.values = NULL;
   cls.valueCount = 0;
   cls.hashes = NULL;
@@ -1875,7 +1879,7 @@
   ttl = ntohl(qmsg->ttl);
   if (ttl < 0) {
     ttl = ttl - 2*TTL_DECREMENT - weak_randomi(TTL_DECREMENT);
-    if (ttl > 0) {
+    if (ttl > 0) { /* integer underflow => drop (should be very rare)! */
       FREE(qmsg);
       if (stats != NULL)
        stats->change(stat_routing_direct_drops, 1);
@@ -1895,7 +1899,9 @@
       "Received GAP query `%s'.\n",
       &enc);
 #endif
-  if ((policy & QUERY_DROPMASK) == 0) {
+  if ((policy & QUERY_DROPMASK) == 0) { 
+    /* policy says no answer/forward/indirect => direct drop;
+       this happens if the peer is too busy (netload-up >= 100%).  */
     FREE(qmsg);
 #if DEBUG_GAP
     if (sender != NULL) {
@@ -1977,20 +1983,21 @@
   coreAPI = capi;
   stats = capi->requestService("stats");
   if (stats != NULL) {
-    stat_routing_collisions = stats->create(gettext_noop("# gap routing table 
collisions resulting in drops"));
-    stat_routing_request_duplicates = stats->create(gettext_noop("# gap 
duplicate requests (received while pending)")); 
-    stat_routing_request_repeat = stats->create(gettext_noop("# gap requests 
re-issued while pending"));
-    stat_routing_request_repeat_dttl = stats->create(gettext_noop("# gap 
re-issue ttl difference (cummulative)"));
-    stat_routing_successes = stats->create(gettext_noop("# gap routing 
successes"));
-    stat_routing_direct_drops = stats->create(gettext_noop("# gap requests 
immediately dropped"));
-    stat_routing_reply_drops = stats->create(gettext_noop("# gap replies 
without routing table entry"));
-    stat_routing_reply_dups = stats->create(gettext_noop("# gap routed reply 
duplicates"));
-    stat_routing_forwards = stats->create(gettext_noop("# gap queries 
forwarded (counting each peer)"));
-    stat_routing_local_results = stats->create(gettext_noop("# gap queries 
received with local result"));
-    stat_routing_totals = stats->create(gettext_noop("# gap total routing 
requests received"));
-    stat_routing_no_answer_policy = stats->create(gettext_noop("# gap requests 
not answered by policy"));
-    stat_routing_no_route_policy = stats->create(gettext_noop("# gap requests 
not routed by policy"));
-    stat_routing_slots_used = stats->create(gettext_noop("# gap routing slots 
currently in use"));
+    stat_routing_totals             = stats->create(gettext_noop("# gap 
requests total received"));
+    stat_routing_direct_drops       = stats->create(gettext_noop("# gap 
requests policy: immediate drop"));
+    stat_routing_no_route_policy    = stats->create(gettext_noop("# gap 
requests policy: not routed"));
+    stat_routing_no_answer_policy   = stats->create(gettext_noop("# gap 
requests policy: not answered"));
+    stat_routing_processed          = stats->create(gettext_noop("# gap 
requests processed: attempted add to RT"));
+    stat_routing_local_results      = stats->create(gettext_noop("# gap 
requests processed: local result")); 
+    stat_routing_successes          = stats->create(gettext_noop("# gap 
routing successes (total)"));
+    stat_routing_collisions         = stats->create(gettext_noop("# gap 
requests dropped: collision in RT"));
+    stat_routing_forwards           = stats->create(gettext_noop("# gap 
requests forwarded (counting each peer)"));
+    stat_routing_request_duplicates = stats->create(gettext_noop("# gap 
duplicate requests (pending)")); 
+    stat_routing_request_repeat     = stats->create(gettext_noop("# gap 
duplicate requests that were re-tried"));
+    stat_routing_request_repeat_dttl= stats->create(gettext_noop("# gap re-try 
ttl difference (cummulative)"));
+    stat_routing_reply_dups         = stats->create(gettext_noop("# gap reply 
duplicates"));
+    stat_routing_reply_drops        = stats->create(gettext_noop("# gap 
spurious replies"));
+    stat_routing_slots_used         = stats->create(gettext_noop("# gap 
routing slots currently in use"));
   }
   GROW(rewards,
        rewardSize,





reply via email to

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