log gauger data, differentiate between hostkey generation and hostkey loading/copying
authorNathan S. Evans <evans@in.tum.de>
Mon, 11 Apr 2011 09:51:00 +0000 (09:51 +0000)
committerNathan S. Evans <evans@in.tum.de>
Mon, 11 Apr 2011 09:51:00 +0000 (09:51 +0000)
src/dht/gnunet-dht-driver.c

index 602f246c43935abb273de148cfa138b676cc6892..99db98acc5f8fbf485b9c01e6948771c261347b1 100644 (file)
@@ -3307,10 +3307,24 @@ hostkey_callback(void *cls, const struct GNUNET_PeerIdentity *id,
 
       GNUNET_asprintf (&revision_str, "%llu", revision);
       if (GNUNET_YES == insert_gauger_data)
-        GAUGER_ID("DHT_TESTING",
-                  "HOSTKEY_GENERATION",
-                  GNUNET_TIME_absolute_get_duration(hostkey_start_time).rel_value / (double)num_peers,
-                  "ms/hostkey", revision_str);
+        {
+          if (GNUNET_YES == GNUNET_CONFIGURATION_have_value (config, "TESTING",
+                                                                   "HOSTKEYSFILE"))
+            {
+              GAUGER_ID("DHT_TESTING",
+                        "HOSTKEY_GENERATION",
+                        GNUNET_TIME_absolute_get_duration(hostkey_start_time).rel_value / (double)num_peers,
+                        "ms/hostkey", revision_str);
+            }
+          else
+            {
+              GAUGER_ID("DHT_TESTING",
+                        "HOSTKEY_GENERATION_REAL",
+                        GNUNET_TIME_absolute_get_duration(hostkey_start_time).rel_value / (double)num_peers,
+                        "ms/hostkey", revision_str);
+            }
+        }
+
       GNUNET_free(revision_str);
 
       GNUNET_SCHEDULER_cancel (die_task);