From: Nathan S. Evans Date: Mon, 11 Apr 2011 09:51:00 +0000 (+0000) Subject: log gauger data, differentiate between hostkey generation and hostkey loading/copying X-Git-Tag: initial-import-from-subversion-38251~18714 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d561fff11e73a8f9886e152bae0695306d32fb67;p=oweals%2Fgnunet.git log gauger data, differentiate between hostkey generation and hostkey loading/copying --- diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index 602f246c4..99db98acc 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c @@ -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);