more logging
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 Apr 2018 18:57:42 +0000 (20:57 +0200)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 Apr 2018 18:57:42 +0000 (20:57 +0200)
src/namestore/gnunet-service-namestore.c
src/zonemaster/gnunet-service-zonemaster.c

index e810e217054f49cde28e02843fae50c2cba497e1..e3936a7cc94cdaaeb316a34c4941dedc79588e44 100644 (file)
@@ -1470,10 +1470,15 @@ run_zone_iteration_round (struct ZoneIteration *zi,
   if (0 == proc.limit)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "More results available\n");
+                "Returned %llu results, more results available\n",
+               (unsigned long long) limit);
     return; /* more results later after we get the
                #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT message */
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Completed iteration after %llu/%llu results\n",
+             (unsigned long long) (limit - proc.limit),
+             (unsigned long long) limit);
   /* send empty response to indicate end of list */
   env = GNUNET_MQ_msg (rrm,
                       GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT);
index 23db61d84aa786a295a27c64320b0651821a879d..55e1a0eee5ec255887d252c516a995e67361f605 100644 (file)
@@ -466,7 +466,7 @@ update_velocity (unsigned int cnt)
 
   /* Tell statistics actual vs. desired speed */
   GNUNET_STATISTICS_set (statistics,
-                         "Current zone iteration velocity (μs)",
+                         "Current zone iteration velocity (μs/record)",
                          delta.rel_value_us,
                          GNUNET_NO);
   /* update "sub_delta" based on difference, taking
@@ -510,15 +510,20 @@ update_velocity (unsigned int cnt)
       if (0 == next_put_interval.rel_value_us)
         pct = UINT64_MAX; /* desired speed is infinity ... */
       else
-        pct = (sub_delta.rel_value_us - next_put_interval.rel_value_us) * 100LLU
+        pct = (sub_delta.rel_value_us -
+              next_put_interval.rel_value_us) * 100LLU
           / next_put_interval.rel_value_us;
       sub_delta = next_put_interval;
     }
   }
   GNUNET_STATISTICS_set (statistics,
-                         "# size of the DHT queue",
+                         "# size of the DHT queue (it)",
                          dht_queue_length,
                          GNUNET_NO);
+  GNUNET_STATISTICS_set (statistics,
+                         "# size of the DHT queue (mon)",
+                         ma_queue_length,
+                         GNUNET_NO);
   GNUNET_STATISTICS_set (statistics,
                          "% speed increase needed for target velocity",
                          pct,
@@ -547,13 +552,13 @@ check_zone_namestore_next ()
                                          sub_delta);
   /* We delay *once* per #NS_BLOCK_SIZE, so we need to multiply the
      per-record delay calculated so far with the #NS_BLOCK_SIZE */
-  delay = GNUNET_TIME_relative_multiply (delay,
-                                         NS_BLOCK_SIZE);
-  GNUNET_assert (NULL == zone_publish_task);
   GNUNET_STATISTICS_set (statistics,
-                         "Current artificial NAMESTORE delay (μs)",
+                         "Current artificial NAMESTORE delay (μs/record)",
                          delay.rel_value_us,
                          GNUNET_NO);
+  delay = GNUNET_TIME_relative_multiply (delay,
+                                         NS_BLOCK_SIZE);
+  GNUNET_assert (NULL == zone_publish_task);
   zone_publish_task = GNUNET_SCHEDULER_add_delayed (delay,
                                                     &publish_zone_namestore_next,
                                                     NULL);
@@ -1024,10 +1029,6 @@ run (void *cls,
     = GNUNET_TIME_relative_multiply (GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY,
                                     PUBLISH_OPS_PER_EXPIRATION);
   next_put_interval = INITIAL_PUT_INTERVAL;
-  GNUNET_STATISTICS_set (statistics,
-                         "Target zone iteration velocity (μs)",
-                         next_put_interval.rel_value_us,
-                         GNUNET_NO);
   namestore_handle = GNUNET_NAMESTORE_connect (c);
   if (NULL == namestore_handle)
   {
@@ -1070,7 +1071,8 @@ run (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _("Could not connect to DHT!\n"));
-    GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
+    GNUNET_SCHEDULER_add_now (&shutdown_task,
+                             NULL);
     return;
   }
 
@@ -1078,6 +1080,10 @@ run (void *cls,
   first_zone_iteration = GNUNET_YES;\
   statistics = GNUNET_STATISTICS_create ("zonemaster",
                                          c);
+  GNUNET_STATISTICS_set (statistics,
+                         "Target zone iteration velocity (μs)",
+                         next_put_interval.rel_value_us,
+                         GNUNET_NO);
   zmon = GNUNET_NAMESTORE_zone_monitor_start (c,
                                               NULL,
                                               GNUNET_NO,